"case"
Is there a better way to write the case range to test for values between 36" and 48"...the compiler says i need an expression term, not sure how to proceed. -thanks mike
repeat
case state 'read state of pir
0 : outa[5]~~ 'red led on if no warm body detected
outa[6..8]~
1 : outa[5]~ 'turn off red led
outa[6]~~ 'yellow led on if warm body detected
case range 'use ping to see if dog is 36" to 48" from sensor
>36 and <48 :outa[7]~~ 'turn on green led...lucy is in the right spot, treadmill will soon start
outa[8]~~ 'turn on transistor 4401 to pull in relay and power treadmill

Comments
case range 37..47: ' do something hereThat is provided range actually delivers values in that area. See also The Manual (rev 1.2, around page 61).repeat case state 'read state of pir 0 : outa[5]~~ 'red led on if no warm body detected outa[6..8]~ 1 : outa[5]~ 'turn off red led outa[6]~~ 'yellow led on if warm body detected case range 'use ping to see if dog is 36" to 48" from sensor 36..48 :outa[7]~~ 'turn on green led...lucy is in the right spot, treadmill will soon start outa[8]~~ 'turn on transistor 4401 to pull in relay and power treadmill