Train Driver Firmware

April 14, 2026 ยท View on GitHub

MegaLinter Continuous Build

languages and tools

Summary

Bare-metal embedded Rust firmware for the Train Driver project. Reads two potentiometer inputs via ADC, maps them to percentage values, and drives PWM outputs to control motor power and LED brightness. A health indicator LED toggles at a configurable interval to confirm the system is running.

Architecture

Equipment

Dependencies

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

Build and Flash

cargo build --release
cargo run --release

Examples

cargo run --example blinky_soft_timer    # Blink PC13 LED via SysTick
cargo run --example drive_leds           # Fade PA6/PA7 LEDs
cargo run --example read_pots            # Log raw ADC values from PA0/PA1