Add AP+STA WiFi manager and stabilize balancing

- Replace wifi.cpp/wifi.h with wifi_manager.cpp/wifi_manager.h: AP and STA
  run together, external WiFi credentials are stored in NVS and editable at
  /wifi, with optional static IP, 15s auto-reconnect, disconnect reason
  reporting, and build/version diagnostics
- Fix MPU6050 I2C port to I2C0 to match the board wiring
- Initialize distance_zeropoint at startup and on Robot Go! rising edge
- Clamp angle_zeropoint to +/-10 degrees to prevent balance-point drift
- Add DEBUG_DISABLE_YAW switch and periodic balance debug output
- Update WiFi setup instructions in README.md and README_CN.md
This commit is contained in:
deepseek Bot committed 2026-10-25 19:15:17 +08:00
1 parent 324d114386
commit 5d9e5f73b0
7 files changed
+700 -88

No files matched your search

+4 -3
View File
@@ -46,9 +46,10 @@ QQ group (unofficial): 991727288
* 2. After turning on the switch, a red light on the main board will indicate that the power is on.
* 3. Next, the wheels will start FOC motor initialization, with the wheels moving slightly and the legs starting to move.
* 4. If the battery is sufficient, the blue LED on the main control board will light up. If it does not light up, charging is needed.
* 5. After this process is complete, press the EN button on the main control board to restart, and you can then connect to the robot's WiFi network starting with WL. The password is the lowercase WiFi name.
* 6. Open a browser and go to the URL 192.168.1.11. The remote control interface is compatible with Android, iOS, Windows, Linux, macOS, etc., and it is recommended to use Chrome or Firefox.
* 7. Manually stabilize the robot, with the wheels slightly touching the ground. Click the "Robot go!" button on the web page, and the robot will stand up. You can then control the robot's movement using the joystick.
* 5. After this process is complete, press the EN button on the main control board to restart. Connect to the robot's WiFi network `WLROBOT` (password `12345678`).
* 6. Open `http://192.168.4.1` in a browser. The remote control interface is compatible with Android, iOS, Windows, Linux, macOS, etc., and it is recommended to use Chrome or Firefox.
* 7. To use an external WiFi router, open "WiFi 设置 / WiFi Settings" on the page, enter the 2.4 GHz SSID/password (static IP is optional), and save. The robot will reboot and join that network. The `WLROBOT` AP remains available as a fallback.
* 8. Manually stabilize the robot, with the wheels slightly touching the ground. Click the "Robot go!" button on the web page, and the robot will stand up. You can then control the robot's movement using the joystick.
#### Open Source Contributors