====== debugln() ====== ''debugln()'' outputs a debug value followed by a newline. {{:en-us_commands:reference:debugln.svg?900|debugln command operation flow}} ''void debugln()''\\ ''void debugln(const __FlashStringHelper* value)''\\ ''void debugln(const String& value)''\\ ''void debugln(const char value[])''\\ ''void debugln(char value)''\\ ''void debugln(unsigned char value, int base = DEC)''\\ ''void debugln(int value, int base = DEC)''\\ ''void debugln(unsigned int value, int base = DEC)''\\ ''void debugln(long value, int base = DEC)''\\ ''void debugln(unsigned long value, int base = DEC)''\\ ''void debugln(double value, int digits = 2)'' ===== Commands ===== ^ Command ^ Arguments ^ Return Value ^ Operation ^ | ''debugln()'' | None | ''void'' | Outputs a debug value followed by a newline. | ===== Example ===== const bool DEBUG_MODE = true; void setup() { if (DEBUG_MODE) { debugStart(115200); // Set the port and baud rate for debug output. } } void loop() { checkInput(); checkOutput(); } void checkInput() { debug("AI0="); // Output values only when debugging is enabled. debugln(analogRead(A0)); // Read the raw analog value of the specified channel. / Output the debug value followed by a newline. } void checkOutput() { debug("millis="); // Output values only when debugging is enabled. debugln(millis()); // Output the debug value followed by a newline. } ===== Precautions ===== * Do not use the same port for Debug and product communication. * Rapid repeated output can slow the control cycle and communication responses. * Stop unnecessary Debug output before deploying for operation. ===== Built-in Commands in the Same Category ===== * [[:en-us_commands:reference:debugstart|debugStart() View detailed description]] * [[:en-us_commands:reference:debugstop|debugStop() View detailed description]] * [[:en-us_commands:reference:debugstate|debugState() View detailed description]] * [[:en-us_commands:reference:debug|debug() View detailed description]] [[:en-us_commands:builtin|← Built-in Command List]]