Hi guys, I am working on a project which takes a temperature reading every 500ms from sensor A.
Sensor B measures ambient temperature every 1000ms (both use millis, not delays )
Sensor A will be used for measuring purposes, so I would like to trigger an event (some haptics for example) when the measured value settles after the sensor is inserted into the medium.
The medium being measured will always be warmer than ambient temperature, I would simply use the ambient temp as reference, so that the value of sensor A has to be more than the value of sensor B for the trigger to take place. Its a K-type sensor, so it reacts quickly.
Therefore I would like to trigger the feedback event if the value of sensor A is more than sensor B, and remains the same, lets say +/- 2°c or so, for either x amount of time or x amount of readings (I think a few seconds, or 6 or so readings should be fine).
What would be the best way to approach this?