Something like this perhaps.
Code:
Main:
GOSUB GetCurrentTemperature
If CurrentTemperature <> PreviouslySentValue THEN ' Compare new value to old measurment.
GOSUB SendNewData
ENDIF
Goto Main
SendNewData:
HSEROUT..... or whatever
PreviouslySentValue = CurrentTemperature ' Store value for comparison next sample
RETURN
On the other hand, it might be good to send occasionally even if the temperature doesn't change. That way you get kind of heartbeat from the transmitter so that the receiver knows its alive.
/Henrik.
Bookmarks