Skip to main content

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.

The Micro Wheeled-Leg Robot firmware is written in Arduino/C++ and runs on an ESP32 microcontroller. Before you can compile and flash the firmware, you need to install the Arduino IDE, add ESP32 board support at the specific version 2.0.3, and install several bundled libraries. Version 2.0.3 of the ESP32 Arduino core is the recommended release for this project — newer board package versions may introduce breaking API changes or incompatibilities with the bundled WebSockets library, so it is important to install exactly this version rather than the latest available.
The WebSockets library included in 3.Software/libraries/WebSockets.zip must be installed from that bundled ZIP file. Do not install the WebSockets library from the Arduino Library Manager — other versions are incompatible with the ESP32 2.0.3 board package and the firmware’s WebSocket server implementation, and the sketch will fail to compile or behave incorrectly at runtime.
1

Download and install Arduino IDE

Go to https://www.arduino.cc/ and download the latest Arduino IDE for your operating system (Windows, macOS, or Linux). Run the installer and follow the on-screen instructions. Launch the IDE once the installation completes.
2

Add the ESP32 board package at version 2.0.3

  1. Open File → Preferences (macOS: Arduino IDE → Preferences).
  2. In the Additional Boards Manager URLs field, paste the following URL:
https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json
  1. Click OK to save.
  2. Open Tools → Board → Boards Manager.
  3. Search for esp32 in the search box.
  4. Find the esp32 by Espressif Systems entry, open the version dropdown, select 2.0.3, and click Install.
Wait for the installation to complete before proceeding.
3

Install bundled libraries from ZIP files

The project ships all required libraries as ZIP archives inside 3.Software/libraries/. Install them one at a time using Sketch → Include Library → Add .ZIP Library…, selecting each file in the following order:
  1. ArduinoJson.zip — JSON serialisation/deserialisation for WebSocket control messages
  2. MPU6050_tockn.zip — MPU6050 IMU driver used to read pitch, roll, and gyro data
  3. Simple_FOC.zip — SimpleFOC BLDC motor control for the two wheel motors
  4. WebSockets.zip — WebSocket server running on port 81 (must use this bundled version)
After adding each ZIP, Arduino IDE will confirm the library was installed successfully. Repeat for all four archives.
ArduinoJson, MPU6050_tockn, and SimpleFOC are standard libraries available through the official Arduino Library Manager. If you have already installed compatible versions of those three from the Library Manager, you may skip adding their ZIPs. However, always use the bundled WebSockets.zip — never substitute the Library Manager version for that one.
4

Open the firmware sketch

In Arduino IDE, go to File → Open and navigate to the firmware folder:
3.Software/wl_pro_robot/wl_pro_robot.ino
Arduino IDE will open the sketch along with all associated tabs (robot.h, wifi.cpp, wifi.h, Servo_STS3032.h, etc.).
5

Select the correct board

Go to Tools → Board → ESP32 Arduino and select ESP32 Dev Module (also listed as ESP32-WROOM-32 depending on your board package version). The Controller PCB is based on an ESP32-WROOM-32 module.
6

Configure upload settings

Under the Tools menu, verify or set the following options:
SettingValue
Upload Speed921600
Flash Frequency80MHz
Partition SchemeDefault 4MB with spiffs (or any scheme that provides sufficient flash)
Leave all other settings at their defaults for the ESP32 Dev Module.
With the IDE configured and all libraries installed, your environment is ready to compile and flash the firmware. Proceed to Configuration to set your WiFi credentials and balance parameters before uploading.

Build docs developers (and LLMs) love