Input output question

How can I make the I/O so then when the input receives ANY input it starts the "if" sequence?

Will you please try again ?

Remove the 'if' statement, then it will always run. "Any" input means either a 1 or a 0, which in turn, means always.

Or explain what you mean...

Also explain why you think this belongs in "introductory tutorials"...

OK. I mean if there is any signal coming from the input it will turn on fully and then when there is none it will turn off fully. I just started Arduino so this stuff is confusing

Arduino - and most computers use ‘binary’ logic.
The result is, internal states and controlled events are either ON or OFF. Nothing in between.

You ‘read’ an input, make a decision, then activate an output as needed.

pseudocode -
if (input == on) do something;

The Arduino IDE comes with pre-installed example sketches. Many of those also have tutorials on this site. So you should start working on those.

Do you mean: "If the input changes from LOW to HIGH or from HIGH to LOW the output will go HIGH until there have been no changes on the input for some specific interval of time."

If so, what interval of time would indicate "no signal"?

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