This project allows the use of STM32 microcontrollers running micropython to control the Robomaster S1 or EDU.
Only CAN BUS High / Low wires need to be connected to the robot gimbal, replacing the cable leading to the control unit (with the antennas).
Use A STM32 NUCLEO board (ethernet) or PYBD-SF6W (WiFi).
The code relies on a patched version of Micropython:
Current firmwares (feel free to request, see boards):
For NUCLEO boards:
For PYBD boards:
Enter DFU bootloader mode by holding down the USR button, pressing and releasing the RST button, and continuing to hold down USR until the LED is white (4th in the cycle), then let go of USR while the LED is white. The LED will then flash red once per second to indicate it is in USB DFU mode. You can then program the firmware using a DFU programmer, eg dfu-util or pydfu.py.
All files except the bin directory to your micro controller FLASH memory. Micropython boards are configured as a USB storage device, so just plug and copy.
For a serial monitoring:
A TCP socket server is setup configure IP parameters in main.py. The client.py script can be used from a PC to send commands using the arrows on the keyboard.
ROS bridge
Credits to robomaster_s1_can_hack project, for inspiring me to create this project