ok I've got this problem that is driving me crazy. (noob here)
I have two temperature sensors. #1 and #2
I want to read #1, then store the value.
Then, for the next 30 minutes, I want to continuously read #2 and compare its fluctuating value with the fixed value of #1. So, say, every time #2 gets below the stored value of #1, do X.
Then, after 30 minutes, I take a new reading of #1 and do the same comparing for the next half-hour. And so on.
My problem is that I don't know how to 'store' the value while the other one keeps on being updated. There must be a way to implement a timer of sorts, I am using an Arduino board to do this stuff, I tried to make a timer using millis() but hey, I just keep reseting it at every iteration of the loop, it's no good : (
I'm in total darkness for now, if anyone could point me in a direction...
thanks