Hi all,
could anyone describe or demonstrate a good (easy?)way to disable a myriad of Serial.print's used for debugging when no longer needed. ie rather than removing them or marking them as comments.
I suspect a rather simple use of a macro and this would a most useful little tool.
There was a recent discussion along these lines, um ... here: http://arduino.cc/forum/index.php/topic,58207.0.html
It's easy to use a class 'Debug' that will do this stuff.
Like
class Debug
{
public:
byte debugEnabled;
Debug();
void SetDebugMode(byte newMode);
byte GetDebugMode();
void Print(char *s);
void Print(int num);
....
}
I use therefore another way to realize it :
While I get an ethernet shield, I use it to let free the serial port.
I use an server on port 23 so from I can telnet to the arduino.
So from, I send my debug strings to the server that display it to my pc.
I've realized a class for it.
}