wdt - wolfen351/public-micropython-iot-platform GitHub Wiki
Overview
The WDTControl
module is a watchdog timer (WDT) implementation for MicroPython. It ensures the system remains responsive by resetting the device if the watchdog is not fed within a specified timeout period. This module is part of the micropython-temp-sensor project and extends the [BasicModule] class.
Features
- Implements a watchdog timer with a configurable timeout (default: 15 minutes).
- Automatically starts and feeds the watchdog timer.
- Supports telemetry and command processing (currently placeholders).
UI
This module does not provide a user interface. It operates in the background to ensure system stability.
Hardware / Pinout
The WDTControl
module uses the hardware watchdog timer provided by the ESP32 module. No additional hardware or pin configuration is required.
Configuration
The timeout for the watchdog timer is set to 15 minutes (900,000 milliseconds) by default. This can be adjusted in the [start] method if needed.
Telemetry Provided
The getTelemetry
method currently returns an empty dictionary ({}
). Future implementations can extend this to provide telemetry data related to the watchdog timer, such as:
- Watchdog status
- Time since the last feed
Telemetry Consumed
The processTelemetry
method is a placeholder and does not currently process any telemetry data. Future implementations can use this method to handle incoming telemetry.
Commands Provided
The getCommands
method currently returns an empty list ([]). Future implementations can extend this to provide commands for interacting with the watchdog timer, such as:
- Starting/stopping the watchdog
- Adjusting the timeout
Commands Consumed
The processCommands
method is a placeholder and does not currently process any commands. Future implementations can use this method to handle incoming commands.