Hello,
I am doing imbedded programming in C and I was wondering how to use a volatile variable as a Boolean. In this case, I am reading some data and my variable is 'delta_X' which is a floating point. I would like
the unit to power down if this value does not change, say for 1 minute. How do I do this?
if (delta_X does not change for one minute) {powerdown();}
I do not want to compare this value with a temp every time because it would be expensive.
Has anyone used an overflow counter to do a powerdown before?
Thanks in advance for you help.