With the Arduino IDE configured, libraries installed, and your WiFi and balance parameters set, you are ready to compile and flash the firmware to the ESP32 Controller PCB. Flashing is done over the Micro-USB port on the controller board — no external programmer is required. The entire process takes about one to two minutes on a typical machine.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/MuShibo/Micro-Wheeled_leg-Robot/llms.txt
Use this file to discover all available pages before exploring further.
Connect the Controller PCB via Micro-USB
Select the correct serial port
- Windows: look for a
COMport (e.g.COM3,COM5) that appeared after plugging in the cable - macOS: look for
/dev/cu.usbserial-XXXXor/dev/cu.SLAB_USBtoUART - Linux: look for
/dev/ttyUSB0or/dev/ttyACM0
Verify the sketch compiles cleanly
Upload the firmware
Writing at 0x00001000... (3 %) confirm that data is being written to flash. The full upload typically takes 20–40 seconds.Observe the post-flash boot sequence
- The red power LED stays on, confirming the board is live.
- The wheel motors will twitch briefly as SimpleFOC runs its FOC encoder alignment routine (this is normal — the
motor1.initFOC()/motor2.initFOC()calls fire duringsetup()). - The leg servos move to their startup positions: ID1 → position 2148, ID2 → position 1948.
- WiFi starts up (AP mode by default: SSID
WLROBOT, password12345678). - If battery voltage is above 7.8 V, the blue LED (GPIO 13) lights up.
Open the Serial Monitor to confirm a clean boot
192.168.1.11.Serial Monitor Output During Boot
The boot sequence has three distinct phases you can observe in the Serial Monitor:- FOC alignment — SimpleFOC drives a small current through each motor phase to detect the encoder’s electrical zero. The wheels will twitch or rotate slightly. This lasts 1–3 seconds per motor. Both motors must complete this before the main loop begins.
-
Servo initialisation — Immediately after FOC,
setup()sends aSyncWritePosExcommand to the STS3032 servos at ACC=30, Speed=300, moving them to the starting leg positions. You will hear the servos step to position. -
WiFi AP start — The ESP32 brings up the
WLROBOThotspot. No explicit confirmation is printed in the default firmware (the Serial.println lines inWiFi_SetAP()are commented out), but the AP becomes visible in your device’s WiFi list within a few seconds of boot completing.
Troubleshooting
Upload fails with 'No serial data received' or times out
Upload fails with 'No serial data received' or times out
Connecting...... in the output panel, release the BOOT button. This forces the chip into download mode. On the Controller PCB, the BOOT button may be labelled IO0.Compilation error: 'WebSocketsServer.h: No such file or directory'
Compilation error: 'WebSocketsServer.h: No such file or directory'
3.Software/libraries/WebSockets.zip. If you previously installed a WebSockets library from the Library Manager, remove it first via Tools → Manage Libraries to avoid conflicts.Compilation error: 'SimpleFOC.h: No such file or directory'
Compilation error: 'SimpleFOC.h: No such file or directory'
3.Software/libraries/Simple_FOC.zip. If you have a different version of SimpleFOC already installed via the Library Manager, it may conflict — remove it and use only the bundled ZIP.Robot falls immediately after standing up
Robot falls immediately after standing up
angle_zeropoint value does not match your specific robot’s IMU mounting position. While holding the robot upright by hand, open the Serial Monitor and observe the raw pitch angle being reported. Set angle_zeropoint in wl_pro_robot.ino to that value, reflash, and test again. See Configuration — Balance Zero-Point for detailed instructions.Blue LED does not light after boot
Blue LED does not light after boot