====== Pico with 2.4" Tenstar SPI LCD ======
Aug 2026
\\
\\
{{ :micro-python.png?100 |}}
----
===== Introduction =====
\\
{{ :tenstar-2.4-lcd-spi-panel.png?200 |}}
\\
Over the last couple of weeks we have been playing with a lot of LCD Panels from our favorite shop AliExpress. Some have been okay, some have been great (the 0.96" OLED Panels have been my favorite so far) but this display we are going to look at today is fantastic. Why?
* Its bright and clear.
* It has the viewing angle of an OLED
* The backlight does't bleed through the LCD.
* It's a great size for most projects.
* The driver supports Text, graphics etc.
This is an LCD you can certainly incorporate in to many projects where an LCD is a requirement. Now things appear and disappear on AliExpress quite a lot, so here is the listing description, and if you search the internet for this you are bound to find these LCDs somewhere?
TENSTAR ROBO 2.4 / 2.8 / 3.5 Inch 240x320 320x480 SPI TFT Serial Port Module 5V/3.3V PCB Adapter T7789V/ST7796S LCD Display
Yes, quite a long description, but searching this will get you one of these LCDs. I recommend you buy at least 2, this makes postage more affordable and means you can have a development and production model.
\\
\\
----
==== The Wiring ====
\\
Here is the wiring diagram, thankfully with a lot of these LCD SPI modules, the pins are in the same order, so once you have a test rig, you can swap displays to try them out (you will need to change the driver also).
\\
\\
{{ :tenstar-2.4-lcd-spi-wiring.png?700 |}}
\\
Just a note on the Pin Labels on the LCD. This LCD is using the following pin labels.
* GND
* VCC
* SCL
* SDA
* RES
* DC
* CS
* BL
But some LCDs use very different names, here is a table below where you can hopefully work out what other Pin Labes are.
\\
\\
{{ :pin-function-table.png?600 |}}
----
==== Test Code ====
\\
We need two files to be able to test this project.
* 1. The Driver for the LCD.
* 2. A test Python script to write to the LCD.
We need to put the driver in the lib folder on the Pico. If you don't have a lib folder you need to create one.
\\
\\
{{ :lib-driver-test-text-2.4-lcd.png?300 |}}
\\
Above we can see the Pico drive, and there is a folder 'lib' with the driver st7789.py, then in the top level folder there is a test file called text-text-examply.py
\\
\\
**Please note, there has been some improvements in the driver since this page was started, the driver is now called st7789nf.py not st7789.py.**
\\
* You can download the driver {{ :st7789nf.zip |Here.}}
* You can download the test Python file {{ :screen-test.zip |Here.}}
Once these are both saved to your Pico, you can open the test file in Thonny.
\\
\\
{{ :thonny-test-python-run.png?700 |}}
\\
Now click the green play button, top left in Thonny, and the code should execute with zero errors.
\\
\\
If you have wired your LCD up correctly, and have placed the driver and the test script in the right place, then you should see something similar to below.
\\
\\
{{ :lcd-8-line-test-2.4-240-320-tenstar.jpeg?300 |}}
\\
Now you are ready to tackle any project on this wiki, or indeed your own project, that requires a nice LED.
\\
\\
----