Pages: 1 [2]   Go Down
Author Topic: compare sensor data range over time to shut off  (Read 1635 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Full Member
***
Karma: 0
Posts: 126
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

i want the led off if the sensor reading stays at same value for "x" amount of time. if not, then i want it to be high. thats all. i can't get this logic down
Logged

Offline Offline
Full Member
***
Karma: 0
Posts: 126
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

when the sensor data stays the same over a range of time, turn led off. when it doesn't, turn on
Logged

Offline Offline
Full Member
***
Karma: 0
Posts: 126
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

when the sensor stays a certain range for "x" amount of time, turn off. else, leave on.
Logged

California
Offline Offline
Faraday Member
**
Karma: 88
Posts: 3384
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

when the sensor stays a certain range for "x" amount of time, turn off. else, leave on.
So the only thing different about what you have and what you posted is you're are not looking for if the oldValue > newValue, you are looking for when they are not equal.
Logged

Pages: 1 [2]   Go Up
Jump to: