Noob here!need help immediately.Make start stop and inching button for DC motor.

(deleted)

success.ino (4.72 KB)

More members will see you code if you post your code as described in the forum guidelines.

What does the code actually do? How is that different from what you want the code to do?

It is likely that no one will write code for you. If you want code written for you, post in Gigs and Collaborations section. Expect to pay.

You should probably read about state machines. I find if I think that way and draw a decent state diagram, the code pretty much falls into place.

Have a look at switch...case too: much easier than if() I find in these projects.

Please give suggestions if possible whole code urgently.

We are volunteers, we don't do 'urgently'. If you want code written for you do as GroundFungus suggested and have this moved to gigs and collaborations and expect to pay. If you want code written urgently expect to pay extra.

I'd do it for free just for the heck of it if I had time. I can't do it even un-urgently before the weekend though.

“ Noob here!need help immediately.”

Why ‘immediately’ ?

larryd:
“ Noob here!need help immediately.”

Why ‘immediately’ ?

Because he is a Noob..........I thought it was obvious. :wink:

(deleted)

yogesh_chauhan:
I should have read guidelines. I'm really sorry. But can you help me out here?

If you have now read the guidelines how about using them? You can edit your initial post to include the code correctly. Then those who are reading on mobile devices might be able to see your code.

Steve

Here's my take on what you want. Please confirm it's correct, unless of course your deadline has expired.

You say the sensors must all be low for the start button to work, but that they can be high later and inch will still work. But does it matter if one or more goes high during the 5s start-up?

705949.PNG

PS, my brain started to fry while trying to figure out which output pins 11, 12 and 13 are for what you called leds 1, 2 and 3. Which is which? (Pins should really get nice names not have meaningless numbers.)

705949.PNG

Anyway I coded it according to that diagram, but of course the diagram's not necessarily right. You can have the code if you want it.

Here's a set of debug prints;

stopped
 starting
stopped
 starting
  started
stopped
 starting
  started
   inching
stopped

if possible whole code urgently

When was the homework assignment due? Is it too late?