What is the code for between two numbers?
noobmuncher
Posts: 124
Hello,
I am working on a stabilization code using the Memsic accelerometer and some code that Beau helped me with last week (topic and code can be found here http://forums.parallax.com/showthread.php?p=865261) and I am running into a problem. I am having a LED turn on whenever one of the axises becomes higher then 15 degrees above level. Now this works very well on two of the four vectors (sorry if that is the wrong terminology) however on the two vectors that require me to the LED turn on when it is less then -15 and greater then -90 I am having a problem.
With the propeller how do you go about saying:
if e == <-15 and >-90 ?
Thank you for the help!
I am working on a stabilization code using the Memsic accelerometer and some code that Beau helped me with last week (topic and code can be found here http://forums.parallax.com/showthread.php?p=865261) and I am running into a problem. I am having a LED turn on whenever one of the axises becomes higher then 15 degrees above level. Now this works very well on two of the four vectors (sorry if that is the wrong terminology) however on the two vectors that require me to the LED turn on when it is less then -15 and greater then -90 I am having a problem.
With the propeller how do you go about saying:
if e == <-15 and >-90 ?
Thank you for the help!
Comments
or
if e < -15 and e > -90
Happy Holidays.