juan luis roman

developer

Arduino and 1.8 TFT display ST7735

15-08-2014 --- 16:53

How to connect a 1.8" TFT display (ST7735 controller) with Arduino Nano.

Parts required:

- Arduino Nano Rev 3.0

- TFT display 1.8 with ST 7735 controller

- Breadboard

- Wires

Here is the connection diagram. 

 

 Example code (hello world):

/*
LED 5V
SCK 13
SDA 11
A0 9
RESET 8
CS 10
GND GND
VCC 5V
*/

#define sclk 13
#define mosi 11
#define cs   10
#define dc   9
#define rst  8 

#include <Adafruit_GFX.h>    // Core graphics library
#include <Adafruit_ST7735.h> // Hardware-specific library
#include 

#if defined(__SAM3X8E__)
    #undef __FlashStringHelper::F(string_literal)
    #define F(string_literal) string_literal
#endif

Adafruit_ST7735 tft = Adafruit_ST7735(cs, dc, mosi, sclk, rst);

void setup(void) {

  tft.initR(INITR_BLACKTAB);
  tft.fillScreen(ST7735_BLACK);
  tft.setCursor(0, 30);
  tft.setTextColor(ST7735_WHITE);
  tft.setTextSize(1);
  tft.println("Hello Juan!");

}

void loop() {
 
}