90Views5Replies

Author Options:

how would I get my arduino to respond to a certain amout of numbers? Answered

I need it to do something only when an input from a sensor gives an input such as 300, all the way up to 400

Discussions

The forums are retiring in 2021 and are now closed for new topics and comments.
0
steveastrouk
steveastrouk

Best Answer 10 years ago

Use an "If" statement ? 


0
wii552
wii552

Answer 10 years ago

how to respond to a range of numbers. I thought of if

0
steveastrouk
steveastrouk

Answer 10 years ago

If (input>300) && (input <400)
{
//do something
}

0
Jayefuu
Jayefuu

Answer 10 years ago

wii552 it sounds like it would be beneficial for you to read through the "Control Structures" section of the arduino website, it explains what Steve's suggested, with some more helpful examples.

http://arduino.cc/en/Tutorial/HomePage

0
wii552
wii552

Answer 10 years ago

don't worry, I got it