A Rust-based PlatformIO Arduino project for controlling a 4-digit 7-segment display with incrementing counter functionality. The purpose of this project is to develop a simple PCB, software, and case design as a template for developing hardware devices from ideation to production.
- Efficient multiplexed display using 74HC595 shift registers
- Safe interrupt handling with Mutex
- Hardware abstraction layer for Arduino integration
- Arduino Uno R3
- 2x 74HC595 shift registers
- 4-digit 7-segment display (common cathode)
- 2x Ceramic capacitors (100nF)
- 1x 5-pin header for Arduino pins
- PlatformIO Core (CLI) or PlatformIO IDE
cargo install cargo-pio
- Rust toolchain with AVR target:
rustup override set nightly rustup target add avr-unknown-gnu-atmega328
- AVR-GCC toolchain
sudo apt-get install -y gcc-avr binutils-avr avr-libc
sudo apt-get install -y python3-venv # If not already installed
cargo install cargo-pio
-
Clone the repository:
git clone https://github.com/sephynox/simple-counter-rs cd simple-counter-rs
-
Build the project:
cargo pio build
-
Flash the firmware to your Arduino Uno:
cargo pio exec -- run --target upload
cargo pio new --board uno your-project-name
This project is licensed under the MIT License - see the LICENSE file for details.