This repository contains a collection of Rust examples designed to run on ESP microcontrollers. These examples demonstrate how to use the esp-hal ecosystem to develop embedded applications for ESP32 chips.
| Project | Description | Features |
|---|---|---|
| clk | Digital Clock | 7-segment display, real-time clock |
| dht11-demo | Temperature & Humidity Sensor | DHT11 sensor, LCD display |
| joystick | Joystick Controller | ADC reading, analog input |
| led | LED Control | GPIO operations, LED strip control with blinksy |
| power | Power Management | Power modes, sleep functions |
| showimg | Image Display | TGA/BMP image rendering on LCD |
| slintui | Slint UI Demo | GUI framework, touch interface |
| snake | Snake Game | Classic game with joystick control |
| sounds | Audio Playback | PCM audio, speaker output |
| tetris | Tetris Game | Classic Tetris with embedded-graphics |
| tui | Terminal UI | Text-based UI with ratatui/mousefood |
| xiaoai-led | Smart LED Control | WiFi, MQTT, smart home integration |
| xiaoai-led-c3 | Smart LED (C3) | ESP32-C3 variant of xiaoai-led |
- Rust 1.88 or later (edition 2024)
- ESP development environment setup:
- Hardware: ESP32-S3 development board (some examples support ESP32-C3)
-
Install ESP Rust toolchain:
cargo install espup espup install
-
Clone the repository:
git clone https://github.com/your-username/esp-rs-examples.git cd esp-rs-examples -
Build and flash an example:
cd led # or any other example cargo build --release cargo run --release
- esp-hal - Hardware Abstraction Layer for ESP chips
- embedded-graphics - 2D graphics library
- mipidsi - MIPI Display Serial Interface driver
- slint - GUI framework for embedded systems
- blinksy - LED strip control library
- embassy - Async framework for embedded
| Feature | ESP32-S3 | ESP32-C3 |
|---|---|---|
| Basic GPIO | ✅ | ✅ |
| WiFi | ✅ | ✅ |
| LCD Display | ✅ | ✅ |
| LED Strip | ✅ | ✅ |
| Touch | ✅ | ❌ |
Each subdirectory contains a complete Rust project with its own configuration. Navigate to the desired example for more details.
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
Made with ❤️ by KKCH