User Tools

Site Tools


en-us_commands:reference:debugstate

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
en-us_commands:reference:debugstate [2026/09/07 21:52] – 만듦 - 바깥 편집 127.0.0.1en-us_commands:reference:debugstate [2026/09/14 20:30] (current) – external edit 127.0.0.1
Line 16: Line 16:
  
 <code cpp> <code cpp>
-if (debugState()) debugln(F("running"));+void setup() { 
 +  debugStart(Serial, 115200, SERIAL_8N1);  // Start the serial port for debug output. 
 +
 + 
 +void loop() { 
 +  if (millis() >= 5000 && debugState()) debugStop();  // Stop debug output after five seconds. 
 +  if (debugState()) {  // Check whether debug output is enabled. 
 +    debugln(millis());  // Print elapsed time while debugging is enabled. 
 +  } 
 +  delay(500); 
 +}
 </code> </code>
  
Line 24: Line 34:
   * Rapid repeated output can slow the control cycle and communication responses.   * Rapid repeated output can slow the control cycle and communication responses.
   * Stop unnecessary Debug output before deploying for operation.   * 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:debug|debug() View detailed description]]
 +  * [[:en-us_commands:reference:debugln|debugln() View detailed description]]
  
 [[:en-us_commands:builtin|← Built-in Command List]] [[:en-us_commands:builtin|← Built-in Command List]]
  
en-us_commands/reference/debugstate.1788785565.txt.gz · Last modified: by 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki