LILYGO T-Display RP2040
LILYGO makes low-cost and high-quality microcontroller development boards that include small displays. Although most of their boards run on C programs on ESP-32 processors, they do have one that runs MicroPython on an RP2040. This "kit" is really just that development board placed on a breadboard. The device has two buttons on it which can be used to adjust the time.
This is a color 1.14 inch LCD display PS with 240*135 resolution. It uses the ST7789V chip that has an extreamly high quality driver created by Russ Hughes that allows for flicker-free drawing.
I purchased mine on Ebay for $10.66 and three dollars for shipping.
Although the display is too small for most robotic applications where the robot is on the floor and we are standing, it is a good example of how we can get both clocks and watches to look great. My hope is that LILYGO comes out with a larger display in the future.
Lilygo also sells their own "wearable" watch kits] for $35 to $45. However, I have not purchased any of these that can be programmed with an RP2040 and MicroPython yet. Here is a GitHub Page for the T-Watch that implies it might be on the way. Note that using this requires extensive knowledge of the ESP32 development system.
Getting Started
To use the ST7789V driver we MUST use a custom image provide by Rull Hughes. This is because the driver is written in low-level C code and the python driver requires it to be combiled into the firmware image.
I downloaded the custom image here:
I then held the Boot button down while I powered up the device.
I soldered my own header pins on the LILYGO and placed it on a breadboard. Unfortunatly this makes it impossible to hold down the boot button with the device on the breadboard.
Pinouts
The pinouts are very different from the Raspberry Pi Pico.
Config File
This implementation puts the driver in a hidden C program, but it does have a configuration file that we must upload and place in the /lib directory.
Here is a Link to the File for the T-Display RP2040
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
|
Blink The Onboard LED
This red LED is on the bottom of the board.
Blink Timer example:
1 2 3 4 5 6 7 |
|
Display Example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
|
Drawing Text
For this example to work, you will need to load a font library into the /lib directory.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
|
Referneces
Item on Aliexpress Sample GitHub repo: https://github.com/Xinyuan-LilyGO/LILYGO-T-display-RP2040
ST7789V Submodule: Russ Hughes GitHub Repo
Config: Sample Config File