Analogue input used to disable an input


Totally new to Arduino and have the Uno board in the post, so should be able to try this out next week.

I am wondering if I have a switch on one input that will start a motor run sequence, while this sequence is running I need to disable to switch. Is this some thing I can do with code or will I need to hold it low while the sequence runs with external circuitry ?

By "disable" did you mean "ignore"?

When your Arduino Uno arrives, upload the "Blink" sketch (is it in the menu: File / Examples / 01.Basics / Blink). Try to make it blink slower and faster.
Then you can try a tutorial for a button. For example this one:

Everything is possible with programming, every logic situation, every sequence, every timing you can imagine.
Sometimes a simple problem requires a complex sketch. The goal is to find the most straightforward simple and easy code to solve the problem. We can help with that of course.

Yes I need the switch to totally be disabled or ignored while the motor cycle is running.

The clue was "ignore".
If you don't read it when the motor is doing its thing, you're ignoring it.

Oh ok, so I can read the motor on the analogue port and then read the switch after the motor signal has stopped.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.