Hey! This is a playground for me to experiment with @brushknight's awesome PixelClick.
In this master
branch, you can see the following areas covered:
- Playing with the back LEDs (red and blue).
- Playing with the front addressable LED panel.
- Async programming with
embassy-rs
. - Checking if the buttons are pressed (no interrupts, concurrent tasks with
embassy-rs
). - Network functionality.
Come on! Go to src/main.rs
!
This is the device pinout, in particular check for the GPIO
labels inside the yellow square which represents the SoC and the labels associated with each of them. This show us what device is connected to each pin, so it's a matter of, taking the outputs as an example, saying if we want to put a HIGH or a LOW on each pin to achieve the effect we want! For the inputs, we would need to check the value somehow and react to it, either via interruptions or some other mean.
This repository offers Dev Containers support, for developing quickly with VS Code.
The ESP32-S3 board uses an architecture that is not available as a target with the stock Rust toolchains (
xtensa-esp32s3-none-elf
). It requires a fork of the Rust compiler and LLVM to have this target available. This Dev Container sets up all these dependencies for you and configures Cargo to target this by default (see.cargo/config.toml
).
-
Terminal approach (useful to quickly edit and add environment variables, just don't commit them if they're sensitive!):
scripts/build.sh [debug | release]
If no argument is passed,
release
will be used as default -
UI approach:
The default build task is already set to build the project, and it can be used in VS Code and GH Codespaces:
- From the Command Palette (
Ctrl-Shift-P
orCmd-Shift-P
) run theTasks: Run Build Task
command. Terminal
->Run Build Task
in the menu.- With
Ctrl-Shift-B
orCmd-Shift-B
. - From the Command Palette (
Ctrl-Shift-P
orCmd-Shift-P
) run theTasks: Run Task
command and selectBuild
. - From UI: Press
Build
on the left side of the Status Bar.
- From the Command Palette (
If you, like me, use Colima for containers in a Mac and had issues exposing the serial device to the container, you can always develop and build the binary from the container and flash the board from outside. Make sure you install either espflash
or probe-rs
.
Once you have built your project with the script or cargo build
or whatever, connect the device to the computer and, from the project's root directory use either:
$ espflash flash --monitor target/xtensa-esp32s3-none-elf/release/<BINARY_NAME>
or
$ probe-rs run --chip esp32s3 target/xtensa-esp32s3-none-elf/release/<BINARY_NAME>
If you don't have this issue, you can just do the following:
-
Terminal approach:
-
Using
flash.sh
script:scripts/flash.sh [debug | release]
If no argument is passed,
release
will be used as default
-
-
UI approach:
- From the Command Palette (
Ctrl-Shift-P
orCmd-Shift-P
) run theTasks: Run Task
command and selectBuild & Flash
. - From UI: Press
Build & Flash
on the left side of the Status Bar.
- From the Command Palette (