en-us_commands:debug_watchdog
This is an old revision of the document!
Debug and Watchdog
| Command | Description |
|---|---|
debugStart(), debugStart(baud), debugStart(serial, baud) | Starts debug output and the port. |
debug(), debugln() | Outputs values only when debugging is enabled. |
debugStop(), debugState() | Stops output or checks the state. |
WDT_ENABLE(time) | Sets the Watchdog timeout and enables it. |
WDT() | Refreshes the Watchdog before its timeout expires. |
WDT_DISABLE() | Disables the Watchdog. |
void setup() { debugStart(115200); WDT_ENABLE(WDT_2S); } void loop() { debugln("running"); WDT(); }
Command Prototypes
| Return Type | Command Prototype |
|---|---|
void | debugStart() |
void | debugStart(unsigned long baudrate) |
void | debugStart(HardwareSerial& serialPort) |
void | debugStart(HardwareSerial& serialPort, unsigned long baudrate, uint8_t config = SERIAL_8N1) |
void | debugStop() |
bool | debugState() |
void | debug(const __FlashStringHelper* value) |
void | debug(const String& value) |
void | debug(const char value[]) |
void | debug(char value) |
void | debug(unsigned char value, int base = DEC) |
void | debug(int value, int base = DEC) |
void | debug(unsigned int value, int base = DEC) |
void | debug(long value, int base = DEC) |
void | debug(unsigned long value, int base = DEC) |
void | debug(double value, int digits = 2) |
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) |
void | WDT_ENABLE(uint8_t ms) |
void | WDT_DISABLE() |
void | WDT() |
Watchdog time constants differ by CPU. Select a timeout comfortably longer than the worst-case communication wait and loop execution time.
en-us_commands/debug_watchdog.1788785565.txt.gz · Last modified: by 127.0.0.1
