Skip to content
Snippets Groups Projects

Installing the motor controller

STM32

You must install the appropriate Rust target and tools:

$ rustup target install thumbv7m-none-eabi
$ cargo install probe-rs-tools

Then flash the executable using

$ cargo run --release -p dc-motor-driver-hat

Raspberry Pi

On the Raspberry Pi, ensure that boot/config.txt contains the following line which defines a software I²C bus:

dtoverlay=i2c-gpio,i2c_gpio_sda=2,i2c_gpio_scl=3,bus=8

Ensure that the line dtparam=i2c_arm=on is not present: that would activate the hardware I²C bus, which cannot be used due to a hardware bug in the BCM2712 SOC with regard to clock stretching.

The Python module is located in controller/python/controller.py.