A demonstration project for the ESP32-S3 microcontroller, showcasing a bouncing text animation on an ATK-MD0240 SPI LCD. This project is built with Rust using the esp-hal
and features custom-written drivers for the display and an XL9555 I/O expander.
This project is a great starting point for anyone looking to drive an SPI display and use I2C peripherals with an ESP32-S3 in Rust.
embedded-graphics
.esp-rs
ecosystem (esp-hal
, esp-backtrace
, etc.).no_std
compatible drivers for both the atk_md0240
display and the xl9555
I/O expander.The following table details the hardware connections used in this project.
ESP32-S3 Pin Connection Notes I2C (for XL9555)GPIO41
XL9555 SDA
I2C Data GPIO42
XL9555 SCL
I2C Clock SPI (for LCD) GPIO11
LCD MOSI
(or SDA
) SPI Master Out, Slave In GPIO12
LCD SCLK
(or SCL
) SPI Clock GPIO13
LCD MISO
(or SDO
) SPI Master In, Slave Out (Optional) GPIO21
LCD CS
SPI Chip Select Direct LCD Control GPIO40
LCD WR/DC
Data / Command Select XL9555 Controlled XL9555 P12
LCD RST
Reset Pin XL9555 P13
LCD PWR
Backlight Power Control 3V3
VCC Power for all components GND
GND Common Ground
This project is built using the Rust programming language and the esp-rs
toolchain.
esp
toolchain. Follow the instructions at https://esp-rs.github.io/book/installation/index.html.espflash
for easy flashing and monitoring:Clone this repository:
https://github.com/KaidRommel/esp-rust-spi-lcd-demo.git cd esp-rust-spi-lcd-demo
Build and Run the project:
You should see the bouncing text animation on your LCD screen!
A key part of this project is the use of two custom-written drivers, which are also available as standalone crates for your own projects:
atk_md0240-rs
: A no_std
driver for the ATK-MD0240 SPI LCD, providing a simple interface compatible with embedded-graphics
.xl9555-rs
: A no_std
driver for the XL9555 I2C I/O expander, allowing easy control of its 16 I/O pins.RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4