mosfet - wolfen351/public-micropython-iot-platform GitHub Wiki
Overview
The MosfetControl
module provides control over four MOSFET switches, allowing them to be turned on, off, or toggled individually or all at once. It also integrates with a web interface for remote control and telemetry monitoring.
Features
- Control up to 4 MOSFET switches.
- Individual or bulk on/off control.
- Web-based interface for toggling switches and monitoring states.
- Telemetry reporting for switch states.
- Command processing for external control.
UI Hardware / Pinout Configuration
- Switch 1: Pin 12
- Switch 2: Pin 11
- Switch 3: Pin 9
- Switch 4: Pin 7
Telemetry Provided
mosfet/S1
: State of Switch 1 (0 = Off, 1 = On)mosfet/S2
: State of Switch 2 (0 = Off, 1 = On)mosfet/S3
: State of Switch 3 (0 = Off, 1 = On)mosfet/S4
: State of Switch 4 (0 = Off, 1 = On)
Telemetry Consumed
None.
Commands Provided
/mosfet/on/<switch_number>
: Turns on the specified switch (1-4)./mosfet/off/<switch_number>
: Turns off the specified switch (1-4)./mosfet/allon
: Turns on all switches./mosfet/alloff
: Turns off all switches.
Commands Consumed
The module processes the above commands to control the MOSFET switches.
Additional Information
The module includes a web interface (mosfet_index.html
) for user interaction. The interface allows toggling individual switches, turning all switches on or off, and displays the current state of each switch.