Let's Make Robots!

Arduino C, IF/THEN IF/ELSE with ranges

How do you define a value range in an IF statement?  I.E.  IF  analog.Read1 >= between 3 and 5  THEN do something

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Something like

IF analog.Read1 > 3 AND analog.Read1 < 5 THEN ...

Opps, forgot the equal part.. Rudolph didn't though.