Go Down

Topic: Graphics library for NodeMCU (ESP8266), ESP32 and serial+parallel TFT displays (Read 69086 times) previous topic - next topic

bodmer

thanks so much it finally worked !!!

It looks like red and blue are swapped so try a different "TAB" option in the setup file if this is the case.

Good luck with your project.

Mac_che

Is there an easy way to download (6Kb) bmp (from a/my internal server) and throw them out of memory when no longer needed?

bodmer

Is there an easy way to download (6Kb) bmp (from a/my internal server) and throw them out of memory when no longer needed?
The simplest method if the server handles http GET commands is to use a method like this example.  However as the image is small, and I assume frequently fetched and erased, then the image can be stored in a RAM array otherwise you could wear out the FLASH memory.

Mac_che

What I assume (Please verify) is that it is not possible to write to SPIFFS during runtime, only during setup phase.

Since i can't store the 1500+ images directly to SPIFFS since it's total size is more than 5MB, i was thinking that I simply download the images I need while they're being seen (silhouettes of the airplane) and store them on SPIFFS. I don't think I will ever see all the 1500+ Airplanes on the device so that's not a problem.

Everyime I download the images during runtime it resets and throws a stack trace on the serial interface.
The images are ok since storing (a few ofcourse) of them to SPIFFS directly and show them on the display works.


I am ok with storing them into ram but well, i can't find any examples for it.

bodmer

What I assume (Please verify) is that it is not possible to write to SPIFFS during runtime, only during setup phase.

Since i can't store the 1500+ images directly to SPIFFS since it's total size is more than 5MB, i was thinking that I simply download the images I need while they're being seen (silhouettes of the airplane) and store them on SPIFFS. I don't think I will ever see all the 1500+ Airplanes on the device so that's not a problem.

Everyime I download the images during runtime it resets and throws a stack trace on the serial interface.
The images are ok since storing (a few ofcourse) of them to SPIFFS directly and show them on the display works.


I am ok with storing them into ram but well, i can't find any examples for it.
SPIFFS is a FLASH based filing system so files can be created and erased during runtime. The main problem is that the FLASH will eventually wear our after maybe less than 1 million write cycles.

There are many reasons why the ESP8266 throws an exception (stack trace), the common reason is the watchdog reset, in this case calling yield() frequently (more than once per second) fixes it. Another reason is using too much RAM or writing past the end of an array.

Unfortunately it will be difficult for me to help you with your project due to the many unknowns in your setup and sketch.

Mac_che

Fixed! Changed the delay from 1 to 1500..than I saw the serial slowly doing it's job..so I played with the value and between 50 and 100 seems ok.

I updated my dev branch accordingly for anyone who's interested.

https://github.com/Ierlandfan/esp8266-plane-spotter-color

If any credits are not where they should be, please let me know.

bodmer

The TFT_eSPI library has been updated on Github to support the SPI overlap mode with the ESP8266.

This means that a SPI based TFT can share the MOSI, MISO and SCK pins with the program FLASH and thus frees up at least 2 GPIO pins for other uses.

To use this capability the latest Github version of the ESP8266 board package must be used in the IDE, as it is not a formal release yet this must be obtained direct from Github. The board package was updated in May 2017 to support the overlap mode. If readers are unsure how update the board package manually then it would be best to wait for the next board package version to be released.


Mac_che

Can someone with more knowledge of arduino IDE help me porting
https://github.com/Links2004/arduinoVNC
to this  library?

What I can deduct it's a script with the functions separated from the driver.
Like: VNCScripts>Framebuffer (function calls for the TFT drver...sort of a wrapper)>TFT driver
So it seems like we need to substitue some references to eTFT. When I tried it gave me a lot of errors
(mostly init related errors with the tft driver) I can't figure out what or how to proceed.
IT would be a nice add-on to use it with this driver.

bodmer

@Mac_che

Looks like an interesting library...  I will take a look.

johnnyfrx

I came across the complete pin mappings for this 3.5" RPi TFT display buried in the aliexpress site. Just in case anyone needs them:

Interface Definition:
PIN NO.                                            SYMBOL                                          DESCRIPTION
1, 17                                                   3.3V                                  Power positive (3.3V power input)
2, 4                                                      5V                                    Power positive (5V power input)
3, 5, 7, 8, 10, 12, 13, 15, 16            NC                                                     NC
6, 9, 14, 20, 25                                GND                                                  Ground
11                                                    TP_IRQ                              Touch Panel interrupt, low level while
                                                                                                 the Touch Panel detects touching
18                                                    LCD_RS                             Instruction/Data Register selection
19                                                    LCD_SI / TP_SI                 SPI data input of LCD/Touch Panel
21                                                   TP_SO                                 SPI data output of Touch Panel
22                                                   RST                                                        Reset
23                                                   LCD_SCK / TP_SCK         SPI clock of LCD/Touch Panel
24                                                   LCD_CS                               LCD chip selection, low active
26                                                  TP_CS                                   Touch Panel chip selection, low active

whyzzie

Hi all,

need some help, got a elegoo tft, any chance to use this display with a nodemcu ?

If so, need to know, how to connect the shield.

Or any other lib

https://www.elegoo.com/product/elegoo-uno-r3-2-8-inches-tft-touch-screen/

Many thanks


joshferg

I have a 3.5" 8-bit ILI9488 touch screen that I am trying to use with an ESP32.

It states its an SPI device and has MISO, MOSI, CS, and pins, but not DC.

Here are the pins it has:

T_CS
CLK
PEN
F_CS
MISO
MOSI
GND (x3)
5V
VDD (x2)
BL
DB0-DB14
RST
WR
RD
CS
RS

There is an onboard SD card slot as well.

My first question is which pins are for the TFT so that I can ignore the SD and touch portions.

Second question is can I make this work without a DC pin, or is one of the pins an alternative for DC?

Thanks!

david_prentice

Please post a link to the actual  display that you are using.

RS (register select) is another name for DC (data/command)

Since you appear to have DB0-DB14 it seems rather unusual
8080-16;would need DB0-DB15
8080-18 would need DB0-DB17
8080-8 would need DB0-DB7 or DB8-DB15

The quality of any reply depends on the quality of your question.

David.

joshferg

Thanks David.

I received some documentation on the board last night. I've attached it.

On my ESP32 I'm getting a white screen.

Here's the config I have enabled in user_select.h

#define RPI_ILI9486_DRIVER

#define TFT_MISO 19
#define TFT_MOSI 23
#define TFT_SCLK 18
#define TFT_CS    17  // Chip select control pin
#define TFT_DC    16  // Data Command control pin
//#define TFT_RST   5  // Reset pin (could connect to RST pin)
#define TFT_RST  -1  // Set TFT_RST to -1 if display RESET is connected to ESP32 board RST

 #define SPI_FREQUENCY  20000000

david_prentice

The schematic shows a 8080-16 interface.
Bodmer's library is for SPI displays.

Go Up