How horizon-fyz/esp32-s3-below works
This firmware is an ESP32-S3 underwater robot remote execution node. The principal workflow is a TCP command from the surface controller, parsed and dispatched by the application, then applied to horizontal thrusters, ballast thrusters, bucket motor, or light; sensor and controller status is reported back. The vertical-control branch combines depth and attitude feedback with PID and motor allocation. Network-driver internals are shown as a supporting layer. README documents additional console and ESC-test modes; source excerpts are partial, so uncertain internal links are omitted.
Main entry points: main.c Remote-node application · vertical_ctrl.c Vertical control · wiznet_manager.c Network manager · wiznet_socket.c Socket wrapper
Components 15
Application workflow
- Remote-node application
main/main.c - Frame protocol
components/control/control.c
Actuation and sensing
- Vertical control
components/vertical_ctrl/vertical_ctrl.c - PID loops
components/vertical_ctrl/pid.c - UART IMU
components/imu/imu.c - MS5837 pressure
components/ms5837/ms5837.c - Motor outputs
components/motor/motor.c
W5500 networking
- Network manager
components/wiznet/src/wiznet_manager.c - SPI bridge
components/wiznet/src/wiznet_spi.c - Socket wrapper
components/wiznet/src/wiznet_socket.c - ioLibrary sockets
components/wiznet/Ethernet/socket.c - W5500 configuration
components/wiznet/Ethernet/wizchip_conf.c - W5500 driver
components/wiznet/Ethernet/W5500/w5500.c
Test mode
- ESC test mode
components/esc_test/esc_test.c
Other components
- Surface controller
Connections 18
- Surface controller → Remote-node application: sends commands
README.md - Remote-node application → Frame protocol: uses frames
main/main.c - Remote-node application → Network manager: initializes network
main/main.c - Remote-node application → Socket wrapper: uses sockets
main/main.c - Remote-node application → Vertical control: starts control
main/main.c - Remote-node application → UART IMU: initializes IMU
main/main.c - Remote-node application → MS5837 pressure: configures depth
main/main.c - Remote-node application → Motor outputs: dispatches outputs
main/main.c - Remote-node application → Surface controller: reports status
README.md - Vertical control → PID loops: runs loops
components/vertical_ctrl/vertical_ctrl.c - Vertical control → UART IMU: reads attitude
components/vertical_ctrl/vertical_ctrl.c - Vertical control → MS5837 pressure: reads depth
- Vertical control → Motor outputs: sets thrusters
components/vertical_ctrl/vertical_ctrl.c - Network manager → SPI bridge: configures bridge
components/wiznet/src/wiznet_manager.c - Network manager → W5500 configuration: initializes chip
components/wiznet/src/wiznet_manager.c - Socket wrapper → ioLibrary sockets: wraps calls
components/wiznet/src/wiznet_socket.c - W5500 configuration → W5500 driver: configures driver
- Remote-node application → ESC test mode: selects test mode
main/main.c