05-29-2019 08:38 PM
Hello, community.
I'm using a LM35 temperature sensor in final project for a class, the thing is that i want it to send a signal (1 or 0) when the measure is above 35C and keep that signal until it goes down to 33C. But i do not want the sensor to send that signal when it reaches 33 for the first time, but only when it's going down and between 35 and 33.
Thank you.
Ignore all the other parts of the system.
- Beginner.
05-29-2019 09:04 PM
You need a shift register to keep track of what the current boolean state is.
When <33 change it to false.
When >35 change it to true.
When between 33 and 35, do nothing, keep it at its current state as stored in the shift register.
Simple logic.
05-30-2019 06:21 AM
What RavensFan already said. And please note that your use of the word security is highly misleading in this aspect. What you want, has a lot more to do with hysteresis than with security.