~pcein/rust-embassy-esp32-demo

Demo: using embassy, the async rust framework, to program an esp32
18d5da45 — Pramode C.E 2 months ago
First commit

refs

master
browse  log 

clone

read-only
https://git.sr.ht/~pcein/rust-embassy-esp32-demo
read/write
git@git.sr.ht:~pcein/rust-embassy-esp32-demo

You can also use your local clone with git send-email.

Demo: programming an esp32 with embassy, the embedded async framework

This demo was tested on an esp32c3 devkitC. The esp32c3 is a risc-v processor.

Setup the rust toolchain for risc-v bare metal compilation:

rustup toolchain install stable --component rust-src --target riscv32imc-unknown-none-elf

Install espflash / cargo-espflash

Warning!! ubuntu users please read this before setting up espflash: installing libudev corrupts the ubuntu graphical desktop.

Connect an LED to GPIO7 of the esp32. Connect GPIO6 to ground through a momentary push button switch.

Clone this repo, build, flash and run the code:

git clone https://git.sr.ht/~pcein/rust-embassy-esp32-demo
cd rust-embassy-esp32-demo
cargo run --release

Press and release the button to toggle the blinking speed from fast to slow and vice versa.