Replies: 8 comments 8 replies
-
You must use #define TFT_SPI_PORT 1 since you are using pins 11, 12, 13. |
Beta Was this translation helpful? Give feedback.
-
Try the Earle Philhower RP2040 package. It is available on Github and is very good. |
Beta Was this translation helpful? Give feedback.
-
Looks like the Arduino package uses an out of date sdk. Replace the spi_get_dreq with this line to avoid the error:
I did modify a copy of the Adafruit library to boost performance with the RP2040. See here: |
Beta Was this translation helpful? Give feedback.
-
I tried selecting the Arduino Nano RP2040 Connect board in Earle Philhower's package and it compiled uploaded and ran fine on a standard RP2040 Pico, this suggests there is nothing special about the Arduino Connect board. |
Beta Was this translation helpful? Give feedback.
-
As far as I can see the Nano Connect does not provide some of the GPIO pins you have selected: Note that when a number for a pin is provided the library assumes it is a GPIO designation. |
Beta Was this translation helpful? Give feedback.
-
Unfortunately the Dxx designations are managed in different ways by different board packages. If you try this:
You will find out. Using Earle Philhower's RP2040 package this prints 5 which is the correct GPIO for the RP2040 Nano Connect. However I strongly suggest you use GPIO numbers as the approach to pin number handling varies between packages. |
Beta Was this translation helpful? Give feedback.
-
Got it working. :D
Those work because they are enums with the respective GPIO value, and work fine internally with pinMode/digitalWrite because of override for those enums. Passing raw integers as pin numbers will never work because TFT_eSPI will treat them as GPIO, but the internal calls to pinMode/digitalWrite treat them as digital pins.
TFT_eSPI will use GPIO 5, but the internal calls to pinMode/digitalWrite will end up using GPIO 17 because of Arduino's Also, it seems we can't use the
I hope it makes sense. |
Beta Was this translation helpful? Give feedback.
-
Here is an example setup file: |
Beta Was this translation helpful? Give feedback.
-
For the last day, I've been trying to get the library to work with an Arduino Nano RP2040 + IL9341 SPI (https://smile.amazon.co.uk/gp/product/B07QJW73M3/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1 ).
After messing around with lots of stuff, such as trying different pins, etc, I couldn't get it to work. It stays a white screen.
To make sure it wasn't a problem with the Arduino or the screen, I tried two Arduino, still without success.
After that, I tried a Pico with that same screen and it worked straight away.
I don't rule the fact I might be getting something wrong, but can anyone confirm they got TFT_eSPI working on an actual Arduino RP2040 (NOT the Raspberry Pico) ?
FYI, this is the config I have, using PlatformIO, with default compiler and Arduino framework.
My platformio.ini file
My program:
What else I tried:
Next thing I'll try is the Adafruit_ILI9341 library, since there are actual videos of people using that combination (AdaFruit_ILI9341 + Arduino RP2040 + SPI screen).
Beta Was this translation helpful? Give feedback.
All reactions