- InsufficientCharge (MyMy)
- Other awesome devs that will add their usernames in the future
Finding information about ESP32 Embassy development on Rust often has you pooling through Github repos, which is why I made this public. However, note that I am simply an individual developer.
Follows Apollolabsdev's implementation of GPIO, but modified to activate a singular LED, blinking it on and off while maintaining a count between tasks.
- Spins up a task for turning on an LED, waiting one second, and then turning off an LED. Main releases async control every 5 seconds.
- Viewable within diagram.json (if you have the VS Code extension for Wokwi) is an ESP32 simulation, connected to an LED and a resistor, where if you run the simulation, should show the functionality in step (1).
Throughout this project, I've found that how old a project is changes what you're capable of implementing with ESP32 Embassy. This repo was developed originally on March 2nd, 2024. Watch the age of the commits; if they're older than 2 years, you may have better luck searching for other Embassy ESP32 WokWi examples.
Many Embassy projects out on Github right now have "examples" folders. If other examples are made using the dynamic used to form this repo, they will be linked in this section. Until then, it is empty. I encourage those working alongside me to develop rust-embedded projects to update this README with hyperlinks to their examples.
- Run a no_std project on an ESP32 to be simulated and tested with CI on Wokwi
- Provide a decent example for doing this for other esp32c3+embassy+wokwi projects in the future
- Have some fun in Rust and see what's possible
Note the Cargo.toml: as it stands, we need these outdated versions to make everything run in Wokwi. Hopefully this is mended in the future. Outdated crates include:
- esp32c3-hal
- embassy-time
- riscv-rt
Also note: I am using WSL: Ubuntu
with rust and cargo installed. Though I have Platform IO installed I am not using it.
Install Rust Embassy
- To those following along: Within the embassy folder, make a projects file. This is a project. You can pull this repo into your new project directory.
Install Wokwi for VS Code
- You will need to create a Wokwi account.
- You will need to enable a community license; this is available for 30 days. I think you can just re-renew it every 30 days; otherwise I'm not sure how anyone gets anything done with Wokwi in a reasonable amount of time.
- The community edition CANNOT edit the diagram using the tool, only simulate. You can edit diagram.json manually.
If you're intending to setup CI, install Wokwi CI.
- You can do CI tests using Wokwi's "scenarios".
- These aren't technically mocks, but they might be a good approach for what we're trying to do for the time being.
- Scenarios are NOT YET DOCUMENTED. Behold, Wokwi's example scenarios.
- Use
cargo build --release
. This will build a binary in thetarget/
directory. - If you're using a physical device, use
cargo run --release
. Otherwise, open diagram.json in VS Code (with the Wokwi VS Code extension properly installed), and click the start simulation button (the "play" button).