Despite my best efforts I can’t seem to get my 1.8" TFT LCD to work with my Particle Photon.
I have been tinkering with an Arduino Uno for maybe five months now and recently got my Particle, so I am by no means confident in my abilities. I am hoping that you guys might be able to tell me what I am doing wrong/missing in my approach.
The LCD breakout has the following PINs:
- VCC
- GND
// 5wire SPI
3. !SCL (SCLK for TFT Clock)
4. !SDA (LCD Data for SPI)
5. DC
6. RES
7. CS
// Micro SD
8. *CS
9. *MISO
// 3-axis (accelerometer)
10. x
11. y
12. z
//
13. BL (Backlight)
I dont use the Accelerometer or the Micro-SD, as my test-code will show:
// This #include statement was automatically added by the Particle IDE.
#include <Adafruit_ST7735.h>
#include <Adafruit_mfGFX.h>
#define TFT_CS A2
#define TFT_RST -1
#define TFT_DC A1
#define TFT_SCLK A3 // !SCL ?
#define TFT_MOSI A5 // !SDA ?
Adafruit_ST7735 tft = Adafruit_ST7735(TFT_CS, TFT_DC, TFT_RST);
void setup() {
tft.initR(INITR_BLACKTAB);
tft.fillScreen(ST7735_BLACK);
tft.setCursor(0, 0);
tft.setTextColor(ST7735_WHITE);
tft.setTextWrap(true);
tft.print("Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur adipiscing ante..");
}
void loop() {
tft.fillScreen(ST7735_BLACK);
delay(1000);
tft.fillScreen(ST7735_WHITE);
delay(1000);
}
The firmware on Photon is version 0.6.3.
Here is the LCD breakout:
I am grateful for any help i can get, and please let me know if you need any additional information. I can say that i tried this LCD on my Arduino with 3.3V and it works perfectly.
Edit: I also want to mention that I looked at what I could find on the forum before posting this (so I know that this exists https://community.particle.io/t/solved-getting-the-st7735-to-work-with-spark/11392), but after trying alot (if not all) the different wiring-solutions I can’t help but feeling like I am missing something that is not related to the wiring (but i might be wrong of course).
Edit nr.2: I don’t know if it matters, but I am using the online IDE