Assuming they work like interrupts then any global variables you are setting inside the interrupt and reading outside it in the loop, or in your publishTemp function might need to be declared volatile, see:
chrisb2
5
Related topics
| Topic | Replies | Views | Activity | |
|---|---|---|---|---|
| Read temperature using a Timer | 24 | 7365 | November 4, 2015 | |
| Software Timers stop to work after time | 18 | 3270 | August 29, 2016 | |
| SUCCESS: Multiple / Single DS18B20 temp sensors on a single OneWire bus | 19 | 6261 | December 4, 2020 | |
| 3 DHT22s w/ Timer - Runs through once, then stops | 2 | 1735 | March 21, 2016 | |
| Spark-dallas-temperature MANUAL mode | 12 | 3166 | December 30, 2016 |