<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[ST7789v display dont works on Lilygo RP2040]]></title><description><![CDATA[<p dir="auto">Friends, I'm programming a LilyGo with an RP2040 processor and a 1.4 inch display for the first time, but I can't program the display!</p>
<p dir="auto"><img src="/assets/uploads/files/1682808677421-ttg-rp2040-display-a.jpg" alt="TTG-RP2040-DISPLAY-a.jpg" class=" img-responsive img-markdown" width="1000" height="706" /></p>
<p dir="auto">I tested various codes and libraries such as TFT_eSPI, Adafruit GFX and Adafruit_ST7789, taking care to correctly configure the pins, and the result is always the same:</p>
<p dir="auto">The code loads, the port 25 led blinks normally, and the serial output of the Arduino IDE prints "On" and "Off", but the display gives no sign of life.</p>
<p dir="auto">The board is brand new and works perfectly with factory settings, but I can't get the display to work with my codes, and neither can the sample codes from any of these libraries.</p>
<p dir="auto">Does anyone have an idea what could be wrong?</p>
<p dir="auto">/*</p>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>Pins</th>
<th>RP2040</th>
</tr>
</thead>
<tbody>
<tr>
<td>TFT Driver</td>
<td>ST7789(240*135)</td>
</tr>
<tr>
<td>TFT_MISO</td>
<td>N/A</td>
</tr>
<tr>
<td>TFT_MOSI</td>
<td>3</td>
</tr>
<tr>
<td>TFT_SCLK</td>
<td>2</td>
</tr>
<tr>
<td>TFT_CS</td>
<td>5</td>
</tr>
<tr>
<td>TFT_DC</td>
<td>1</td>
</tr>
<tr>
<td>TFT_RST</td>
<td>0</td>
</tr>
<tr>
<td>TFT_BL</td>
<td>4</td>
</tr>
<tr>
<td>PWR_ON</td>
<td>22</td>
</tr>
<tr>
<td>BOTTON1</td>
<td>6</td>
</tr>
<tr>
<td>BOTTON2</td>
<td>7</td>
</tr>
<tr>
<td>RedLED</td>
<td>25</td>
</tr>
</tbody>
</table>
<p dir="auto">1 - GP0 - I/UART0_RX - I2C0_SDA - PWM<br />
2 - GP1 - UART0_TX - I2C0_SCL - PWM<br />
3 - GP2 - UART1_TX - SPI1_SCK - PWM<br />
4 - GP3 - UART1_RX - SPI1_MOSI - PWM<br />
5 - GP4 - SPI1_MISO - PWM<br />
6 - GP5 - SPI1_CS - I2C0_SDA - PWM<br />
7 - GP6 - IO - PWM<br />
8 - GP7 - IO - PWM<br />
9 - GP8 - IO - PWM<br />
10 - GP9 - IO - PWM<br />
11 - GP10 - IO - PWM<br />
12 - GP11 - IO - PWM<br />
13 - GP12 - IO - PWM<br />
14 - GP13 - IO - PWM<br />
15 - GP14 - UART1_RX - SPI1_MISO - PWM<br />
16 - GP15 - UART1_TX - SPI1_CS - PWM<br />
17 - GP16 - IO - PWM<br />
18 - GP17 - IO - PWM<br />
19 - GP18 - IO - PWM<br />
20 - GP19 - IO - PWM<br />
21 - GP20 - IO - PWM<br />
22 - GP21 - IO - PWM<br />
23 - GP22 - IO - PWM<br />
24 - GP26 - IO<br />
25 - GP27 - IO<br />
26 - GP28 - IO<br />
27 - GP29 - IO<br />
28 - GP30 - IO<br />
29 - GP31 - IO<br />
*/</p>
<p dir="auto">#include &lt;Adafruit_GFX.h&gt; // Include the Adafruit GFX library<br />
#include &lt;Adafruit_ST7789.h&gt; // Include the Adafruit ST7789 library</p>
<p dir="auto">#define TFT_MOSI 3<br />
#define TFT_MISO 14<br />
#define TFT_SCLK 2<br />
#define TFT_BL 4 // LED backlight<br />
#define TFT_CS 5 // Chip select control pin D8<br />
#define TFT_DC 1 // Data Command control pin<br />
#define TFT_RST 0 // Reset pin (could connect to NodeMCU RST, see next line)</p>
<p dir="auto">#define LAMP_X 80 // Define the X coordinate of the lamp<br />
#define LAMP_Y 80 // Define the Y coordinate of the lamp<br />
#define LAMP_WIDTH 50 // Define the width of the lamp<br />
#define LAMP_HEIGHT 80 // Define the height of the lamp</p>
<p dir="auto">const int LED_PIN = 25;<br />
const int t=1000;</p>
<p dir="auto">Adafruit_ST7789 tft = Adafruit_ST7789(TFT_CS, TFT_DC, TFT_RST); // Initialize the TFT display</p>
<p dir="auto">void setup() {<br />
Serial.begin(115200);<br />
pinMode(TFT_BL, OUTPUT); // Set the TFT backlight pin as an output<br />
digitalWrite(TFT_BL, HIGH); // Turn on the backlight<br />
pinMode(LED_PIN, OUTPUT);<br />
tft.init(135, 240); // Initialize the TFT display with 240x240 resolution<br />
tft.fillScreen(ST77XX_BLUE); // Fill the screen with blue color<br />
}</p>
<p dir="auto">void loop() {<br />
digitalWrite(TFT_BL, HIGH); // Turn on the backlight<br />
digitalWrite(LED_PIN, HIGH);<br />
tft.fillRect(LAMP_X, LAMP_Y, LAMP_WIDTH, LAMP_HEIGHT, ST77XX_BLUE); // Fill the lamp area with blue color<br />
Serial.println("On");<br />
delay(t); // Wait for 1 second<br />
tft.fillRect(LAMP_X, LAMP_Y, LAMP_WIDTH, LAMP_HEIGHT, ST77XX_YELLOW); // Fill the lamp area with yellow color<br />
digitalWrite(LED_PIN, LOW);<br />
Serial.println("Deleted");<br />
delay(t); // Wait for 1 second<br />
}</p>
<p dir="auto">Thanks for the help!</p>
]]></description><link>https://www.community.lilygo.cc/topic/303/st7789v-display-dont-works-on-lilygo-rp2040</link><generator>RSS for Node</generator><lastBuildDate>Mon, 18 May 2026 10:01:25 GMT</lastBuildDate><atom:link href="https://www.community.lilygo.cc/topic/303.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 29 Apr 2023 22:53:01 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to ST7789v display dont works on Lilygo RP2040 on Mon, 01 May 2023 02:02:42 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://www.community.lilygo.cc/uid/735">@aravecchia</a> Try changing the initialisation string from tft.init(135, 240); to tft.init(); or tft.begin(); and add TFT_eSPI tft = TFT_eSPI(135,240); between your include and define declerations.</p>
]]></description><link>https://www.community.lilygo.cc/post/612</link><guid isPermaLink="true">https://www.community.lilygo.cc/post/612</guid><dc:creator><![CDATA[1530dean]]></dc:creator><pubDate>Mon, 01 May 2023 02:02:42 GMT</pubDate></item><item><title><![CDATA[Reply to ST7789v display dont works on Lilygo RP2040 on Sun, 30 Apr 2023 21:58:42 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://www.community.lilygo.cc/uid/612">@teastain2</a> said in <a href="/post/608">ST7789v display dont works on Lilygo RP2040</a>:</p>
<blockquote>
<p dir="auto">New Lilygo boards are very demanding of installation procedure.<br />
Their GitHub repository is here:<br />
<a href="https://github.com/Xinyuan-LilyGO/LILYGO-T-display-RP2040" rel="nofollow ugc">https://github.com/Xinyuan-LilyGO/LILYGO-T-display-RP2040</a><br />
Item 5) "Copy TFT_eSPI to the &lt;C:\Users\Your User Name\Documents\Arduino\libraries&gt; directory"<br />
is very important and overrides any concern for using the default Arduino library. Also after installing do NOT do an Arduino library Update...it will not work.<br />
Also use a simple example from the repository such as Blink!<br />
<a href="https://github.com/Xinyuan-LilyGO/LILYGO-T-display-RP2040/blob/main/example/Arduino/blink/blink.ino" rel="nofollow ugc">https://github.com/Xinyuan-LilyGO/LILYGO-T-display-RP2040/blob/main/example/Arduino/blink/blink.ino</a><br />
Once you get this figured out you are on your own!!!</p>
</blockquote>
<p dir="auto">Yes, I tried to use the TFT_eSPI library in different ways, and I changed the User_Setup.h file to set the display pins correctly. In the code, you'll see that I added a blink and an on-off message appearing in the serial output, just to make sure it loaded correctly. But the display gives no sign of life, anyway!</p>
]]></description><link>https://www.community.lilygo.cc/post/610</link><guid isPermaLink="true">https://www.community.lilygo.cc/post/610</guid><dc:creator><![CDATA[aravecchia]]></dc:creator><pubDate>Sun, 30 Apr 2023 21:58:42 GMT</pubDate></item><item><title><![CDATA[Reply to ST7789v display dont works on Lilygo RP2040 on Sun, 30 Apr 2023 00:56:29 GMT]]></title><description><![CDATA[<p dir="auto">New Lilygo boards are very demanding of installation procedure.<br />
Their GitHub repository is here:<br />
<a href="https://github.com/Xinyuan-LilyGO/LILYGO-T-display-RP2040" rel="nofollow ugc">https://github.com/Xinyuan-LilyGO/LILYGO-T-display-RP2040</a><br />
Item 5) "Copy TFT_eSPI to the &lt;C:\Users\Your User Name\Documents\Arduino\libraries&gt; directory"<br />
is very important and overrides any concern for using the default Arduino library. Also after installing do NOT do an Arduino library Update...it will not work.<br />
Also use a simple example from the repository such as Blink!<br />
<a href="https://github.com/Xinyuan-LilyGO/LILYGO-T-display-RP2040/blob/main/example/Arduino/blink/blink.ino" rel="nofollow ugc">https://github.com/Xinyuan-LilyGO/LILYGO-T-display-RP2040/blob/main/example/Arduino/blink/blink.ino</a><br />
Once you get this figured out you are on your own!!!</p>
]]></description><link>https://www.community.lilygo.cc/post/608</link><guid isPermaLink="true">https://www.community.lilygo.cc/post/608</guid><dc:creator><![CDATA[teastain2]]></dc:creator><pubDate>Sun, 30 Apr 2023 00:56:29 GMT</pubDate></item></channel></rss>