Hi ive been looking at the reference on the arduino website and can't find how to constrain a number between two points(say I want an analog input to only be between 0 and 180) please help this has been bothering me for a bit.
The map() function is good for this.
Located Here: http://arduino.cc/en/Reference/Map
I would have thought the constrain() function would be more suitable.
Thanks for the answering but it says Does not constrain values to within the range, because out-of-range values are sometimes intended and useful.
how would i constrain values to be within the range
how would i constrain values to be within the range
constrain()
thanks