
HexControllerV3
TH4R4V3N1324/Hexapod
This repository contains the complete design, control software and documentation for a six-legged walking robot (hexapod).

Embedded firmware and hardware-support code for a hexapod robot controller. The repository contains firmware for the handheld/controller interface, an ESP32 wireless receiver, ATtiny1616 left and right boards, and a…
HexControllerV3 larger is an open-source printed circuit board by TH4R4V3N1324, from the TH4R4V3N1324/hexapod-controller repository on GitHub. It is a 4-layer board of 140.7 × 77.4 mm with 48 parts on 70 nets, routed with 400 tracks and 60 vias.
It is built around the ESP32-S2-MINI-1-N4R2, AMS1117-3.3 and IP5306, with the COM-16273 and TS-1088-AR02016 among its other parts. Its parts include 13 capacitors, 8 resistors, 8 switches, 7 connectors and 5 diodes. It belongs with the ESP32 boards of this library.
Embedded firmware and hardware-support code for a hexapod robot controller. The repository contains firmware for the handheld/controller interface, an ESP32 wireless receiver, ATtiny1616 left and right boards, and a newer ESP32-S3/LVGL controller implementation.
The system is primarily written in C/C++ and uses PlatformIO, Arduino, and ESP-IDF. Communication is built around ESP-NOW for wireless control packets and I²C for exchanging controller and robot-state data.
controller/
controller/
include/ Legacy controller headers
ControllerLogic.h High-level controller behavior
DataPacket.h Packet definitions
Display.h Display abstraction
I2CManager.h I²C communication
Input.h Joystick and button input
Pages.h UI page definitions
sensors/ Sensor interfaces
src/ Legacy controller implementation
main.cpp Application entry point
ControllerLogic.cpp Controller state and behavior
DataPacket.cpp Packet handling
Display.cpp Display implementation
I2CManager.cpp I²C implementation
Input.cpp Input handling
Pages.cpp Page rendering
sensors/ Sensor implementations
schematic/ Hardware schematics
photoshopPages/ UI design assets
screenImages/ Display graphics
controllerV2/The controller sends a packed ControlPacket containing joystick values, robot height, a command, and command arguments. The receiver validates the packet size, updates its control state, and sends the latest HexPacket back to the configured controller using ESP-NOW.
The receiver also exposes the current ControlPacket over I²C and accepts updated HexPacket data from the I²C master. I²C is configured as slave address 0x08.
Controller UI
│
│ ESP-NOW: ControlPacket
▼
ESP32 receiver
│
├── ESP-NOW: HexPacket response
│
└── I²C slave 0x08
│
▼
Controller/masterBoth packets use packed structures so their byte layouts remain consistent across devices.
struct ControlPacket {
int16_t joystick1X;
int16_t joystick1Y;
int16_t joystick2X;
int16_t joystick2Y;
int16_t currentHeight;
Command command;
int16_t commandArgs[3];
};Available commands:
CMD_NONE
CMD_SET_GAIT
CMD_SET_MODE
CMD_SET_CONFIG
CMD_HOME_STANCE
CMD_REQUEST_CONFIGstruct HexPacket {
int16_t legConfigs[3];
int16_t currentHeight;
int16_t currentPhase;
int16_t currentGait;
int16_t currentMode;
};The receiver rejects packets whose size does not exactly match the expected structure. Keep field order and types synchronized across all firmware projects.
controllerV2/controllerV2cd controller/controller
pio run
pio run --target upload
pio device monitor --baud 115200Target configuration:
esp32-s2-saola-1olikraus/U8g2115200 baudThe PlatformIO configuration currently uses COM4 as the upload port. Change upload_port in controller/controller/platformio.ini for your machine.
cd receiver
pio run
pio run --target upload
pio device monitor --baud 115200The receiver targets an esp32dev board with the Arduino framework.
Before using the receiver, verify the peer MAC address in receiver/include/CommEspNow.h:
uint8_t controllerMAC[] = {
0xFC, 0x01, 0x2C, 0xD9, 0x41, 0xE4
};The current implementation uses unencrypted ESP-NOW and a hard-coded peer address.
cd controllerV2/Left_Board
pio run
pio run --target uploadThe project is configured for:
ATtiny161620 MHzCOM3Update upload_port in platformio.ini when necessary.
cd controllerV2/Right_Board
pio run
pio run --target uploadThe right board uses the same ATtiny1616, Arduino, 20 MHz, and SerialUPDI configuration as the left board.
cd controllerV2/controllerV2
idf.py set-target esp32s3
idf.py build
idf.py -p PORT flash
idf.py -p PORT monitorOr run the complete workflow with:
idf.py -p PORT build flash monitorThe V2 project is organized as an ESP-IDF application with LVGL, RGB LCD, touch input, wireless communication, battery monitoring, RTC, IMU, SD-card, buzzer, and I²C subsystems.
ControlPacket and HexPacket use #pragma pack(push, 1) to prevent compiler padding.0x08.115200 baud.COM3 and COM4; replace them on other platforms.Check that the sender and receiver use the same packed structure definition, field order, and integer widths. The receiver logs the expected and received packet sizes over serial.
Verify that:
receiver/include/CommEspNow.h is correct.Verify the wiring, ground connection, master/slave roles, and that the master addresses the receiver at 0x08. Also confirm that the transmitted data size equals sizeof(ControlPacket) or sizeof(HexPacket) as appropriate.
Check the selected serial port, programmer wiring, board power, and upload protocol. The ATtiny1616 projects use SerialUPDI, while the ESP32 projects use their PlatformIO or ESP-IDF upload workflows.
No license file is currently included in the repository. Unless a license is added, the code should be treated as all rights reserved.
| Qty | Value | Footprint | References |
|---|---|---|---|
| 6 | 22uF | SamacSys_Parts:CAPC2012X140N | C3, C10, C11, C12, C13, C14 |
| 5 | SW_DIP_x01 | SamacSys_Parts:DTS62NV | SW2, SW3, SW4, SW5, SW6 |
| 5 | ~ | SamacSys_Parts:KP1608SURCK | LED1, LED2, LED3, LED4, LED5 |
| 2 | 100nF | SamacSys_Parts:CAPC2012X95N | C4, C6 |
| 2 | 10k | Resistor_SMD:R_0805_2012Metric | R1, R8 |
| 2 | 10uF | Capacitor_SMD:C_0805_2012Metric | C8, C9 |
| 2 | 5.1k | Resistor_SMD:R_0805_2012Metric | R3, R4 |
| 2 | Battery | BatteryHolder:14500 battery holder | J2, J7 |
| 2 | COM-16273 | SamacSys_Parts:COM16273 | VR1, VR2 |
| 2 | TS-1088-AR02016 | SamacSys_Parts:TS1088AR02016 | S1, S2 |
| 1 | 0.5R | Resistor_SMD:R_0805_2012Metric | R6 |
| 1 | 100R | Resistor_SMD:R_0805_2012Metric | R2 |
| 1 | 10uF | SamacSys_Parts:CAPPM3216X180N | C2 |
| 1 | 1uF | SamacSys_Parts:CAPC2012X135N | C5 |
| 1 | 1uH | SamacSys_Parts:XAL40XX | L1 |
| 1 | 20R | Resistor_SMD:R_0805_2012Metric | R7 |
| 1 | 22uF | SamacSys_Parts:CAPPM3528X210N | C1 |
| 1 | 2R | Resistor_SMD:R_0805_2012Metric | R5 |
| 1 | AMS1117-3.3 | Package_TO_SOT_SMD:SOT-223-3_TabPin2 | U2 |
| 1 | ESP32-S2-MINI-1-N4R2 | SamacSys_Parts:ESP32S2MINI1N4R2 | IC1 |
| 1 | IP5306 | SamacSys_Parts:SOIC127P600X165-9N | IC2 |
| 1 | RotaryEncoder_Switch | SamacSys_Parts:PEC11L4120FS0020 | SW1 |
| 1 | Switch1 | Connector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_Vertical | J3 |
| 1 | Switch2 | Connector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_Vertical | J4 |
| 1 | Switch3 | Connector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_Vertical | J5 |
| 1 | Switch4 | Connector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_Vertical | J6 |
| 1 | USB_C_Receptacle_USB2.0_16P | Connector_USB:USB_C_Receptacle_GCT_USB4105-xx-A_16P_TopMnt_Horizontal | J1 |
| 1 | ~ | Hexapod:WaveShare_2.42inch_SSD1309_OLED | U1 |

TH4R4V3N1324/Hexapod
This repository contains the complete design, control software and documentation for a six-legged walking robot (hexapod).

JGAguado/Smart_Plant
The Smart Plant is a board that can be plugged directly on the soil, close to the plant, that allows the measurement of the environment (soil moisture, environment temperature & illuminance), and presents the…

DepartmentOfAlchemy/minimain-esp32-s2
PCB files for the MiniMain ESP32-S2 in an Adafruit Feather compatible format.


AfriOrbit/SDR-IOT-project
This project includes all work materials for the SDR and IOT communication systems.

Anda2012/Open-line-tracer
ESP32-C3 Mini-1 + Massmore JET QTR-11D A fast and accurate MicroPython line follower using the ESP32-C3 Mini-1 and an 11-channel JET QTR-11D sensor.


broedschroed/NeoChristmasTreeV2
ESP32-powered Christmas tree ornament: 66x WS2812 LEDs on a 4-wing dual-PCB tree, IR remote with learnable sleep timer, browser-based pattern editor, LDR auto-brightness
It measures 140.7 × 77.4 mm and has 4 copper layers, 1.6 mm thick.
48 parts, built around the ESP32-S2-MINI-1-N4R2, AMS1117-3.3, IP5306 and COM-16273. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.
From the TH4R4V3N1324/hexapod-controller repository on GitHub, at the commit this page was made from: the board is controller/schematic/hexControllerV3/hexControllerV3_larger.kicad_pcb and its schematic controller/schematic/hexControllerV3/hexControllerV3.kicad_sch. PCBKit opens the board in the browser, with nothing to install.
Its repository states no licence, so its author keeps all rights: ask TH4R4V3N1324 before reusing the design.