Skip to content

mwesterm/esp32c3-shared-i2c

Repository files navigation

ESP32C3 Display Project

Example using embassy to asynchronously use the i2c-bus and operate 2 devices in asynchronous mode:

  • Pressure sensor ms5611 is read in one task and sends the data via
  • in another task, a button is evaluated. Each press increments a counter and sends it via a channel
  • a task updates an ssd1306 display (128x32 pixels) by receiving the pressure sensor measurement and button counter via channels and displaying them

Prerequisites

  • Rust
  • ESP-IDF
  • An ESP32-C3 development board
  • ms5611 with i2c interface
  • ssd1306 display with i2c interface
  • I2C bus wiring: SDA: GPIO 6, SCL GPIO 7
  • Button: Wiring GPIO2, GND

Installation

  1. Clone the repository:
git clone https://github.com/your-username/esp32c3-display.git
cd esp32c3-display
  1. Install the dependencies:
rustup target add riscv32imc-unknown-none-elf
cargo install espflash
  1. Build the project:
cargo build

Usage

  1. Flash the firmware to the ESP32-C3 board:
cargo run
  1. Connect the display to the ESP32-C3 board according to the pinout in the documentation.2. Connect the display to the ESP32-C3 board according to the pinout in the documentation.

  2. Start the board and check the display.3. Start the board and check the display.

License## License

This project is licensed under the MIT License. See the LICENSE file for more details.This project is licensed under the MIT License. See the LICENSE file for more details.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages