Use this forum to chat about hardware specific topics for the ESP8266 (peripherals, memory, clocks, JTAG, programming)

User avatar
By johnzbesko
#92603 After all sorts of searching and trying all sorts of libraries, pin locations, etc., I've run out of ideas.

Attached is an example .ino that only partially works. Simply, it reads a jpg file on a SD and displays it on the TFT. Currently, it is able to locate and read the jpg file, but nothing shows up on the screen. I have gotten the TFT to display stuff, but attempting to add the SD then makes both fail. Perhaps I have to alter the TFT_eSPI configuration files? What pins should I use for the TFT? Any help is greatly appreciated!
You do not have the required permissions to view the files attached to this post.
User avatar
By johnzbesko
#92617 OK, success! The Adafruit_ST7735.h library does not seem to allow multiple SPI devices, so I attempted to use the TFT_eSPI.h library. Because the TFT_eSPI is designed to work with many different displays, it is necessary to read thru the User_Setup_Select.h and the User_Setup.h files and then the proper Setup##_*******.h file in the User_Setups subdirectory. I have the Sainsmart ST7735 1.8" TFT LCD 128x160 Pixel.

When a simple .ino like TFT_graphicstest_small.ino (included as part of TFT_eSPI) is able to draw on the display, the next step is to add the wiring for the SD card. The wiring I used was:

for the display,
VCC to the VIN pin on the ESP8266MOD (apparently, a 3.3v pin is not powerful enough)
GND to GND
SCL to pin D5, GPIO14
SDA to pin D7, GPIO13, otherwise known as MOSI
RS/DC to pin D2, GPIO4
RES to pin RST (uses -1 as pin assignment in ino)
CS to pin D3, GPIO0

for the microSD card,
MISO to pin D6, GPIO12
SCLK to pin D5, GPIO14 (same as SCL above)
MOSI to pin D7, GPIO13 (same as SDA above)
CS to pin D8, GPIO15

The working .ino is attached.
You do not have the required permissions to view the files attached to this post.