ja-jp_commands:debug_watchdog
文書の過去の版を表示しています。
DebugとWatchdog
| コマンド | 説明 |
|---|---|
debugStart(), debugStart(baud), debugStart(serial, baud) | デバッグ出力とポートを開始します。 |
debug(), debugln() | デバッグが有効な場合だけ値を出力します。 |
debugStop(), debugState() | 出力を停止または状態を確認します。 |
WDT_ENABLE(time) | Watchdogの制限時間を設定して有効にします。 |
WDT() | 制限時間が切れる前にWatchdogを更新します。 |
WDT_DISABLE() | Watchdogを無効にします。 |
void setup() { debugStart(115200); WDT_ENABLE(WDT_2S); } void loop() { debugln("running"); WDT(); }
コマンドのプロトタイプ
| 戻り型 | コマンドのプロトタイプ |
|---|---|
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の時間定数はCPUによって異なります。通信待ちとループの最悪実行時間より十分長い値を選択してください。
ja-jp_commands/debug_watchdog.1788785587.txt.gz · 最終更新: by 127.0.0.1
