Have you programmed in C or Java? The $D is similar to printf”%d”) in C, which means printing out an integer number. In any case, that part of the code uses Jeelab’s EtherCard library, and you may want to check their documentations and forum for answers to specific questions.
I would like to play with the Opensprinkler code. I modified some minor things successfully however I got stuck. I need some debug info but printf command will not work. A printf (“echo” \n) has been put into main loop, however no output on linux console neither redirecting to a file works. Any hint?
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.
I have OSPi. Debug is enabled by default. I could not see debug info in console, neither was able to forward it into a file. However if I start the program directly and not using the init script the debug lines appear. It is good enough so far.