Skip to content

k9ame/esp-rs-examples

Repository files navigation

ESP-Rust Examples

License: MIT Rust ESP32-S3

中文文档

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.

📋 Projects Included

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

🛠️ Prerequisites

  • Rust 1.88 or later (edition 2024)
  • ESP development environment setup:
    • espup for toolchain installation
    • probe-rs for flashing and debugging
  • Hardware: ESP32-S3 development board (some examples support ESP32-C3)

🚀 Getting Started

  1. Install ESP Rust toolchain:

    cargo install espup
    espup install
  2. Clone the repository:

    git clone https://github.com/your-username/esp-rs-examples.git
    cd esp-rs-examples
  3. Build and flash an example:

    cd led  # or any other example
    cargo build --release
    cargo run --release

📦 Key Dependencies

  • 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

🔧 Hardware Support

Feature ESP32-S3 ESP32-C3
Basic GPIO
WiFi
LCD Display
LED Strip
Touch

📖 Documentation

Each subdirectory contains a complete Rust project with its own configuration. Navigate to the desired example for more details.

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

📄 License

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


Made with ❤️ by KKCH

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors