Skip to content

A complete embedded device example in Rust using an Arduino, KiCad, and Fusion360.

License

Notifications You must be signed in to change notification settings

sephynox/simple-counter-rs

Repository files navigation

Simple 7-Segment Display Controller

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.

Features

  • Efficient multiplexed display using 74HC595 shift registers
  • Safe interrupt handling with Mutex
  • Hardware abstraction layer for Arduino integration

Circuit Diagram

Circuit Diagram

Breadboard Design

Breadboard Design

PCB Design

PCB Design Front PCB Design Back

PCB Assembled

PCB Assembled

Case Design

Case Design Case Design

Hardware Setup

  • 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

Prerequisites

  • 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

Install Dependencies

sudo apt-get install -y python3-venv # If not already installed
cargo install cargo-pio

Building and Flashing

  1. Clone the repository:

    git clone https://github.com/sephynox/simple-counter-rs
    cd simple-counter-rs
  2. Build the project:

    cargo pio build
  3. Flash the firmware to your Arduino Uno:

    cargo pio exec -- run --target upload

How to Create a New Project

cargo pio new --board uno your-project-name

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

A complete embedded device example in Rust using an Arduino, KiCad, and Fusion360.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published