This is a combination of the SSD1306 library text-i2c example with the I2C examples from the esp-idf-hal library.
This was written for an unidentified ESP32 dev board, 30 pins with an ESP-WROOM-32 module.
It is driving a 128x32 OLED screen of unknown provenance driven by an SSD1306 driver chip.
- Follow The Rust on ESP Book to the point of getting the onboard LED to blink
- Connect the screen SDA and SCL to the dev board on two output-capable pins e.g. 22, 23
- Generate new project: cargo generate esp-rs/esp-idf-template cargo
- copy contents of
main.rs
from this project cargo add
the missing modules:
embedded_graphics
esp_idf_hal
anyhow
ssd1306
cargo run
to compile and upload to the ESP32