| ST7735 | ESP32 GPIO | description |
|---|---|---|
| LED | GPIO 18 | backlight |
| SCK | GPIO 14 | SPI SCL |
| SDA | GPIO 13 | SPI MOSI |
| A0 | GPIO 17 | ? command/data selection ? |
| RESET | GPIO 16 | LCD reset, active low |
| CS | GPIO 15 | chip select |
| ESP32 GPIO | description |
|---|---|
| GPIO 19 | left eye / LED0 |
| GPIO 21 | right eye / LED1 |
Make sure to use the main branch. cargo run will do the trick.
See "Rust on ESP" book for instructions for setting up the toolchain: https://docs.esp-rs.org/book/introduction.html
Either use the esp32 branch, or:
-
Uncomment the line in
build.rsfile.#[cfg]are not defined when building it, andembuild::espidfjust doesn't exist on non-ESP builds so a runtime check fails to compile. Of course there's a 6-year-old issue about this. rust-lang/cargo#4932 -
Uncomment the
channel = "esp"line inrust-toolchain.tomlfile, and comment thechannel = "stable"one. -
Uncomment the
#target = "xtensa-esp32-espidf"line in.cargo/config.toml.