OpenSprinkler Forums OpenSprinkler Unified Firmware Programming question. Reply To: Programming question.

#40606

Ray
Keymaster

Do you have OpenSprinkler or OSPi/OSBo? To do debug with OpenSprinkler, you should uncomment the following line in defines.h:
https://github.com/OpenSprinkler/OpenSprinkler-Firmware/blob/master/defines.h#L283
which enables the SERIAL_DEBUG macro. Then you can either use Arduino’s standard Serial interface, such as Serial.print and Serial.println to print values, or use the macro defined DEBUG_PRINT() to print debug data. To use serial debug, you need a serial monitor, such as gtkterms in Linux, or Arduino’s Serial monitor to display the serial data.

TO debug with OSPi/OSBo, make sure this line is enabled:
https://github.com/OpenSprinkler/OpenSprinkler-Firmware/blob/master/defines.h#L354
and then you can just use standard C printf — the data will be printed to the console where you run the firmware from.