Skip to content

Control and animate a 7-segment display using the ESP32 microcontroller and Rust

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

amrondonp/esp32-7seg-rust

Repository files navigation

7-Segment Display Fun with ESP32 and Embedded Rust 🔢⚡

An embedded Rust experiment driving a 7-segment LED display using an ESP32 and the esp-hal crate.

This is a fun little project to explore #![no_std] development with Rust on ESP32, and how to animate a 7-segment display.

✨ Features

  • Count from 0 to F in hexadecimal
  • Circular segment animation (circle)
  • Snake-style effect across segments (snake_eight)
  • Simple sequence lighting demo (sequence)
  • Modular display logic

💻 Hardware Requirements

  • ESP32 development board
  • Common cathode 7-segment LED display
  • 8 GPIO-connected resistors (1 per segment)
  • Breadboard and jumper wires
  • USB cable and UART for flashing

📦 Crates Used

  • esp-hal — Hardware Abstraction Layer for ESP chips
  • esp-backtrace — for panic handling
  • no_std, no_main, #[entry] from esp-hal-macros

🧠 Segment Mapping

 _
|_|
|_|

Segment Indexes:
 1
0 2
 3
4 6
 5   .7 (dot)

🧪 Animations

  • count – display digits 0–F one at a time
  • snake_eight – animates a snake-like motion over the digit "8"
  • circle – moves a lit segment in a circular motion
  • sequence – turns on each segment in order

Each function demonstrates basic GPIO manipulation and delay usage in a no_std context.

About

Control and animate a 7-segment display using the ESP32 microcontroller and Rust

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages