SmartESC (aka SESC) is an alternative firmware for Xiaomi M365 and Ninebot G30 controller.
Avantage over other Xiaomi custom firmwares :
Cons :
It can interface :
Nota : this firmware is in beta.
You'll be able to setup and control the controller/motor from VESCTool interface with a simple USB/Serial adapter. With any small arduino, use analog acceleration/brake throttles to control any electic moving device like escooter, gokart, electric skateboard without using the stock display.
Download the latest build for M365 :
If you want to build it manually, for an easier build, you need git
and docker
.
git clone https://github.com/Koxx3/SmartESC_STM32_v2.git
Launch from terminal:
chmod +x docker_build*; ./docker_build_m365.sh
chmod +x docker_build*; ./docker_build_g30.sh
Double click :
docker_build_m365.sh
docker_build_g30.sh
You need a ST-Link device to reprogram the M365/G3O controller. It costs 3/4€ on Aliexpress.
Plug the st-link following this schematic :
With STM32 ST-Link Utility, disable Re&d out protection.
Menu "Target" => "Option bytes"
Use VescTool to setup the motor and input properties.
Use a serial USB adapter to connect the Xiaomi controller as an USB VESC :
Launch VESCTool and connect with COM port.
Launcher Motor setup wizzard.
Enter all your settings in the different windows.
Enable the keyboard control :
You're ready to test your M365 controller with your keyboard !
M365 connections :
Use ESP32 prototype board with and ESP32-devkit-c module :
Use the code provided in the serial-trottle-brake-esp32 folder with Platform.io
Can read it in "VESC Terminal" (or others Serial Terminal)