OpenEnergyMonitor Community

Wdt code location?

I want to compile something that contains the “wdt” routine. Which bit of code do I need to download to get this routine?

The code I am trying to compile is for the Dallas 1-wire temperture sensors.

wdt as in watchdog timer? What’s the exact name of the routine you want to call? Support for the watchdog timer is built in to avr-libc:

To get access to the function prototypes and #defines etc in your code, you just need to include:

#include <avr/wdt.h>

in angle brackets. I don’t know how to stop this forum software from interpreting the angle brackets and the hash-include which is why I’ve removed them from the line above, Anyone know how to turn off all interpretations of special characters?

[Edited code block - pb66]

You can use

before and after the code block

Excellent thanks… and thanks for tidying up my posting with that feature.

Thank you for the reply. I am trying to compile “HeatpumpMonitor_AutoTemp”. It does have the above code in it, but the compile fails because the compiler can’t find avr/wdt.h

My understanding of the language and the compiler is a bit limited. I would be very grateful if you tell me exactly what I should download and where I should put. (maybe the same folder as the .ino file)

The file should have been installed when you set up the Arduino IDE. It is in:

[your Arduino folder]/hardware/tools/avr/avr/include/avr

If you didn’t install the Arduino IDE, full instructions are here.