HomeArduino TutorialsInterfacing ST7735 TFT Display with Arduino – Display Text, Graphics, and Images from SD Card

How to Interface ST7735 TFT Display with Arduino (With SD Card Image Display)

The ST7735 TFT display is a bright and colorful 1.8-inch screen that works perfectly with Arduino boards. It’s based on the ST7735 driver IC and uses the SPI interface, which makes it both fast and easy to connect. With this small display, you can show text, draw shapes, or even load real images directly from an SD card.

In this tutorial, we’ll learn how to interface the ST7735 display with Arduino step by step. We’ll start with wiring and setup, move on to displaying text and graphics, and finally, we’ll show how to display images from an SD card on the ST7735 screen.

If you’re new to SD cards with Arduino, check out our detailed guide here:
Interface SD Card with Arduino using SPI

By the end of this post, you’ll be able to use your ST7735 as a mini-display for your Arduino projects, perfect for IoT dashboards, small games, or sensor data visualization.

How to Interface ST7735 TFT Display with Arduino

Introduction to ST7735 TFT Display

What is the ST7735 Display

The 1.8-inch ST7735 TFT display is a small, full-color screen that’s widely used in Arduino projects and other embedded systems. It uses the ST7735 driver IC, which controls the display through the SPI communication interface — allowing fast data transfer between the Arduino and the screen.

This 1.8-inch TFT module offers a resolution of 128×160 pixels, providing a clear and colourful output for its size. It can display up to 65,000 colors (16-bit color depth), which makes it suitable for showing not only text and shapes but also small bitmap images or icons.

1.8" ST7735 TFT display Module

Although the display works on 3.3V logic, it can easily interface with 5V Arduino boards such as the Uno, Nano, or Mega using proper level shifting or resistor dividers. Its compact design and low power usage make it ideal for portable or handheld projects.


ST7735 Specifications and Features

Here are the main specifications and key features of the 1.8-inch ST7735 TFT display:

  • Display Size: 1.8 inches (diagonal)
  • Resolution: 128 × 160 pixels
  • Driver IC: ST7735
  • Interface: SPI (Serial Peripheral Interface)
  • Color Depth: 16-bit (65K colors)
  • Operating Voltage: 3.3V (some modules include a 5V-compatible regulator)
  • Backlight: Built-in white LED
  • Viewing Angle: Up to 160° (for IPS variants)
  • Refresh Rate: Suitable for smooth animations and graphics
  • Compact Size: Lightweight and easy to mount on breadboards or small enclosures

This module combines bright color output, simple wiring, and low power consumption, which makes it one of the most popular small TFT screens for Arduino users. It’s powerful enough to show sensor data, graphs, menus, or even small images from an SD card.


Why Use ST7735 with Arduino

The 1.8-inch ST7735 TFT is an excellent choice for Arduino projects because of its SPI interface, great color quality, and readily available libraries. It allows beginners and advanced users alike to add graphics and color displays to their projects without much effort.

Here’s why the 1.8-inch ST7735 works so well with Arduino:

  • Simple SPI wiring – requires only a few pins for communication.
  • Vibrant 16-bit color display – ideal for text, gauges, and icons.
  • Compact and affordable – fits perfectly in small projects.
  • Fully supported by Adafruit’s ST7735 and GFX libraries, making coding straightforward.
  • Compatible with popular Arduino boards like Uno, Nano, and Mega.

This display is great for IoT dashboards, mini game consoles, sensor monitors, and any project where you want to make your Arduino output visually appealing. Later in this tutorial, we’ll also explore how to display BMP images directly from an SD card, giving you even more creative options.

ST7735 Pinout and Connection with Arduino

Let’s start with the ST7735 Pin description first.

ST7735 Pin Description

The 1.8-inch ST7735 TFT display communicates with the Arduino using the SPI interface, which makes wiring simple and efficient. Different modules may have slight variations in labeling, but most ST7735 displays include the following pins:

1.8" ST7735 display Pinout.
Pin NameDescription
GNDGround connection (connects to Arduino GND).
VCCPower supply pin. Usually 3.3V, but some modules include a regulator and can accept 5V.
SCL (CLK)Serial Clock pin. Used to synchronize data transfer between Arduino and display.
SDA (MOSI)Serial Data input pin. Carries display data from Arduino to the ST7735.
RES (RESET)Resets the display when pulled LOW. Helps initialize the display during startup.
DC (A0)Data/Command control pin. Tells the display whether data or a command is being sent.
CSChip Select pin. Enables or disables communication with the display. Active LOW.
BL (LED)Controls the display backlight. Connect to 3.3V (or 5V if supported) for constant brightness, or to a PWM pin for dimming.

Note: Some ST7735 modules also include pins like MISO or SD_CS if they have an onboard SD card slot. These are not used for the basic display connection but will be important later when we display images from the SD card.


ST7735 Arduino Connection Diagram

To connect the 1.8-inch ST7735 display to an Arduino Uno or Nano, we’ll use the SPI pins. The SPI pins on different Arduino boards may vary slightly, but for Uno and Nano, they are fixed at pins 11 (MOSI), 13 (SCK), and 10 (SS).

The image below shows the connection between Arduino UNO and ST7735 LCD display.

Image showing the wiring diagram between 1.8" ST7735 display and Arduino UNO.

Here’s the connection table:

ST7735 PinArduino Uno/Nano PinDescription
VCC5V (or 3.3V if your module doesn’t have a regulator)Power supply for the display
GNDGNDCommon ground
SCL (CLK)D13SPI Clock
SDA (MOSI)D11SPI Data from Arduino to Display
RES (RESET)D8Reset control pin
DC (A0)D9Data/Command selection
CSD10Chip Select pin
BL (LED)3.3V or D6 (PWM optional)Backlight control

Tip: Always check your module’s specifications. Some displays have onboard level shifters, but if yours doesn’t, use a voltage divider on the SPI lines to protect the 3.3V logic display from 5V signals.


Wiring ST7735 in SPI Mode

The ST7735 uses SPI (Serial Peripheral Interface) for communication. In this mode, the Arduino acts as the master, and the display acts as the slave. SPI is fast and reliable, making it perfect for transferring display data like pixels, colors, and bitmaps.

Here’s how the SPI wiring works:

  • SCL (Clock) synchronizes communication between Arduino and the display.
  • SDA (MOSI) sends pixel and command data from Arduino to the display controller.
  • CS selects the ST7735 device so multiple SPI devices can share the same bus.
  • DC defines whether the incoming byte is a command (LOW) or data (HIGH).
  • RESET ensures the display starts in a known state.

For stable performance:

  • Keep the SPI wires short to reduce noise.
  • Ensure the display is properly powered (preferably from a regulated 3.3V pin).
  • If the display flickers or shows distorted colors, lower the SPI speed slightly in your code.

Once the wiring is done correctly, you can move on to setting up the Arduino IDE and libraries to communicate with the display smoothly.

Setting Up Arduino IDE for ST7735

Before we start displaying text, graphics, or images on the 1.8-inch ST7735 TFT display, we need to set up the Arduino IDE properly. The setup includes installing the right libraries, running a basic test code, and verifying that the display is working as expected.

Installing Adafruit ST7735 and GFX Libraries

The easiest way to use the ST7735 display with Arduino is through the Adafruit ST7735 and Adafruit GFX libraries. These libraries handle all the low-level communication with the display and make it easy to draw text, shapes, and bitmaps.

Here’s how to install them:

  1. Open Arduino IDE on your computer.
  2. Go to Sketch → Include Library → Manage Libraries…
  3. In the Library Manager, type “Adafruit ST7735” in the search bar.
  4. Install the “Adafruit ST7735 and ST7789 Library” by Adafruit.
  5. Next, search for “Adafruit GFX Library” and install it as well.
install Adafruit GFX library for ST7735 and ST7789 on Arduino IDE

Once installed, you’ll find several example sketches in:
File → Examples → Adafruit ST7735 and ST7789 Library

These examples are pre-configured to work with different versions of the ST7735 display, including the 1.8-inch module we’re using.

Tip: Make sure both libraries are from Adafruit to avoid compatibility issues. If you already have older versions installed, update them before proceeding.


Basic Code to Test Display

After installing the libraries, it’s time to test whether the display is wired and functioning correctly.

Here’s a simple example sketch to verify your setup:

#include <Adafruit_GFX.h>      // Core graphics library
#include <Adafruit_ST7735.h>   // ST7735 display library
#include <SPI.h>               // SPI communication library

// Define pins used for the ST7735
#define TFT_CS     10
#define TFT_DC      9
#define TFT_RST     8

// Create the display object
Adafruit_ST7735 tft = Adafruit_ST7735(TFT_CS, TFT_DC, TFT_RST);

void setup() {
  // Initialize Serial Monitor
  Serial.begin(9600);
  Serial.println("Initializing ST7735 display...");

  // Initialize display
  tft.initR(INITR_BLACKTAB); // Use INITR_BLACKTAB for most 1.8" displays
  tft.fillScreen(ST77XX_BLACK);
  
  // Display test text
  tft.setTextColor(ST77XX_WHITE);
  tft.setTextSize(2);
  tft.setCursor(10, 20);
  tft.println("ST7735 Test!");
}

void loop() {
}

After Uploading this code to Arduino, the display turns on with a black screen and shows the text “ST7735 Test!” in white.
this is shown in the image below.

Text being printed on the ST7735 1.8" display connected to Arduino via SPI.

Note: Some 1.8″ displays may use a different tab color such as INITR_GREENTAB or INITR_REDTAB. If the colors appear inverted or the screen is blank, try changing this line accordingly:

tft.initR(INITR_GREENTAB);

Experiment with these options until the display output looks correct.


Verifying Setup with Example Sketch

Once the basic test code works, it’s a good idea to run the official Adafruit example sketches to fully verify your setup.

You can access them from:
File → Examples → Adafruit ST7735 and ST7789 Library → graphicstest

Adafruit example for graphic test on the ST7735 LCD display.

Upload the graphicstest example and watch your display run through several animations — lines, shapes, colors, and text demonstrations.

Gif showing the graphictest is performed on the ST7735 display connected to arduino via SPI.

This confirms that:

  • Your wiring is correct.
  • The display is powered properly.
  • The SPI communication is working without errors.

If you notice flickering, incorrect colors, or a blank screen, double-check your connections and ensure your CS, DC, and RST pins match the pin definitions in the code.

Once everything is working, you’re ready to move on and learn how to display text, shapes, and full-color images on your 1.8-inch ST7735 display.

Displaying Text, Shapes, and Colors on ST7735

Once your 1.8-inch ST7735 TFT display is successfully connected and initialized, you can start adding visuals such as text, geometric shapes, and background colors. The Adafruit GFX library makes this process very simple by providing easy-to-use functions for graphics and text rendering.

In this section, we’ll learn how to print text, draw basic shapes, and fill the display with colors.

Printing Text and Number on the Screen

Displaying text is one of the simplest and most useful features of the ST7735 display. You can use it to show messages, sensor readings, or any information you want directly on the screen.

Here’s a simple example:

#include <Adafruit_GFX.h>
#include <Adafruit_ST7735.h>
#include <SPI.h>

#define TFT_CS   10
#define TFT_DC    9
#define TFT_RST   8

Adafruit_ST7735 tft = Adafruit_ST7735(TFT_CS, TFT_DC, TFT_RST);

void setup() {
  tft.initR(INITR_BLACKTAB);  // Initialize the display
  tft.fillScreen(ST77XX_BLACK); // Clear the screen
  
  tft.setTextColor(ST77XX_GREEN); // Set text color
  tft.setTextSize(1); // Set text size
  tft.setCursor(10, 20); // Set text position
  tft.println("Hello World!");
  
  tft.setTextColor(ST77XX_RED); // Set text color
  tft.setTextSize(2); // Set text size
  tft.setCursor(10, 80); // Set text position
  tft.println(123.45); // Print Number
}

void loop() {
}

Explanation:

  • tft.setTextColor() sets the color of the text.
  • tft.setTextSize() adjusts how large the characters appear.
  • tft.setCursor(x, y) sets the starting position for the text.
  • tft.println() prints the text string or number on the display.

The image below shows the output of printing txt and number on the screen.

Image shows the text and number being printed on the ST7735 1.8" display.

Drawing Lines, Circles, and Rectangles

The Adafruit GFX library includes functions to draw a variety of shapes, allowing you to create graphical interfaces or visual indicators on your display.

Here are some common drawing functions:

tft.drawLine(0, 0, 127, 159, ST77XX_WHITE);      // Draw a diagonal line
tft.drawRect(10, 10, 60, 40, ST77XX_RED);        // Outline rectangle
tft.fillRect(20, 20, 60, 40, ST77XX_BLUE);       // Filled rectangle
tft.drawCircle(64, 80, 30, ST77XX_YELLOW);       // Outline circle
tft.fillCircle(64, 80, 20, ST77XX_GREEN);        // Filled circle

Explanation:

  • drawLine(x0, y0, x1, y1, color) draws a line between two points.
  • drawRect(x, y, width, height, color) makes a rectangle outline.
  • fillRect() fills the rectangle with color.
  • drawCircle(x, y, radius, color) and fillCircle() draw circular shapes.

Note: The coordinate system starts at the top-left corner (0, 0), with X increasing to the right and Y increasing downward.

The image below shows the output on the screen with the shapes drawn.

Image shows different shaped are drawn on the 1.8" ST7735 display, connected to the Arduino.

You can combine these shapes to make progress bars, icons, or simple gauges on your display.


Filling the Screen with Colors

Sometimes, you may want to clear the display or fill it with a solid background color. The fillScreen() function makes this easy:

void loop() {
tft.fillScreen(ST77XX_BLUE);  // Fills the display with blue color
delay(1000);
tft.fillScreen(ST77XX_RED);   // Then fills it with red
delay(1000);
tft.fillScreen(ST77XX_BLACK); // Finally clears the screen
delay(1000);
}

The gif below shows the colors on the screen changing every 1 second.

Different colours are being filled on the screen, ST7735 connected to Arduino.

The Adafruit library defines many standard color constants such as:

  • ST77XX_BLACK
  • ST77XX_WHITE
  • ST77XX_RED
  • ST77XX_GREEN
  • ST77XX_BLUE
  • ST77XX_YELLOW
  • ST77XX_CYAN
  • ST77XX_MAGENTA

You can also create custom colors using the color565() function:

uint16_t myColor = tft.color565(255, 100, 50);  // RGB format
tft.fillScreen(myColor);

Tip: The RGB values range from 0–255 each, giving you access to over 65,000 color combinations.

By combining text, shapes, and colors, you can easily design a clean and informative user interface for your Arduino projects. In the next section, we’ll take it a step further, learning how to display images from an SD card on the ST7735 screen.

Displaying Images from SD Card on ST7735

One of the most impressive features of the 1.8-inch ST7735 TFT display is its ability to display bitmap (BMP) images directly from an SD card.
This allows you to show logos, icons, or even small photos on your Arduino-based projects, perfect for dashboards, menu screens, or startup animations.

In this section, we’ll go through everything step-by-step: connecting the SD card module, preparing your BMP files, and displaying them on the TFT screen.

If you’re new to using SD cards with Arduino, check out this detailed guide first: Interface SD Card with Arduino using SPI.

Connecting the SD Card Module

Most ST7735 display boards either include a built-in microSD card slot or require you to connect an external SD card module via SPI. The SD card also communicates over SPI, which means it shares the same MOSI, MISO, and SCK lines with the display.

Here’s how you can connect the SD card module to the Arduino Uno/Nano:

SD Card Module PinArduino PinDescription
VCC5VPower supply for SD module
GNDGNDCommon ground
MOSID11Master Out Slave In (shared with ST7735)
MISOD12Master In Slave Out
SCKD13SPI Clock (shared with ST7735)
CS (Chip Select)D4Separate CS pin for SD card

Important:
Both the ST7735 and SD card module use SPI, but each must have its own CS (Chip Select) pin.
For example, use D10 for ST7735_CS and D4 for SD_CS.

Your wiring should look something like this:

  • ST7735 CS → D10
  • ST7735 DC → D9
  • ST7735 RST → D8
  • SD Card CS → D4
  • MOSI (D11), MISO (D12), SCK (D13) shared between both.

The image below shows the connection between ST7735 (with SD card) and Arduino UNO.

Image showing the wiring between Arduino, ST7735 display and SD card.

Formatting and Loading BMP Images

The ST7735 library supports displaying 24-bit BMP images directly from the SD card.
Before loading images, make sure to format and prepare your SD card properly:

  1. Format the SD Card
    • Use FAT32 format (recommended for cards up to 32GB).
    • You can use your computer’s file manager or the SD Card Formatter tool.
  2. Prepare Your BMP Images
    • Image format: .bmp (24-bit)
    • Resolution: Should be 128×160 pixels or smaller (depending on your display’s orientation).
    • Save images in bitmap format (not JPEG or PNG) using tools like MS Paint or GIMP.
    • Example: Save your image as image.bmp
  3. Copy Images to SD Card
    • Place your BMP files in the root directory of the SD card for easy access.
    • Example: image1.bmp logo.bmp

The image below shows the image files stored in the SD card. We will display these 2 images on the ST7735.

Image files stored in the SD card, which will be displayed on the ST7735.

Tip: Large BMP files or incorrect bit depths (like 32-bit) won’t display properly. Always save in 24-bit uncompressed BMP format.


Displaying BMP Images on the TFT

Once your SD card and images are ready, you can use Adafruit’s built-in example to display them on your ST7735 display.

Here’s a basic code example:

#include <Adafruit_GFX.h>
#include <Adafruit_ST7735.h>
#include <SPI.h>
#include <SD.h>

#define TFT_CS   10
#define TFT_DC    9
#define TFT_RST   8
#define SD_CS     4

Adafruit_ST7735 tft = Adafruit_ST7735(TFT_CS, TFT_DC, TFT_RST);

void setup() {
  Serial.begin(9600);
  tft.initR(INITR_BLACKTAB);
  tft.fillScreen(ST77XX_BLACK);

  
  // Initialize SD card
  if (!SD.begin(SD_CS)) {
    Serial.println("SD Card initialization failed!");
    return;
  }
  Serial.println("SD Card initialized.");
}

void loop() {
    // Display BMP image
  bmpDraw("image1.bmp", 0, 0);
  delay(2000);
  bmpDraw("image2.bmp", 0, 0);
  delay(2000); 
}

void bmpDraw(char *filename, uint8_t x, uint8_t y) {
  File bmpFile;
  int bmpWidth, bmpHeight;
  uint8_t bmpDepth;
  uint32_t bmpImageoffset;
  uint32_t rowSize;
  uint8_t sdbuffer[3*20]; // RGB buffer
  uint8_t buffidx = sizeof(sdbuffer);
  boolean goodBmp = false;
  boolean flip = true;
  int w, h, row, col;
  uint8_t r, g, b;

  if((x >= tft.width()) || (y >= tft.height())) return;
  bmpFile = SD.open(filename);
  if (!bmpFile) {
    Serial.println("File not found");
    return;
  }

  if (read16(bmpFile) == 0x4D42) { // BMP signature
    read32(bmpFile); read32(bmpFile);
    bmpImageoffset = read32(bmpFile);
    read32(bmpFile);
    bmpWidth  = read32(bmpFile);
    bmpHeight = read32(bmpFile);
    if(read16(bmpFile) == 1 && (bmpDepth = read16(bmpFile)) == 24 && read32(bmpFile) == 0) {
      goodBmp = true;
      rowSize = (bmpWidth * 3 + 3) & ~3;
      if(bmpHeight < 0) { bmpHeight = -bmpHeight; flip = false; }
      w = bmpWidth; h = bmpHeight;
      tft.setAddrWindow(x, y, x+w-1, y+h-1);
      for (row=0; row<h; row++) {
        bmpFile.seek(bmpImageoffset + (flip ? (bmpHeight - 1 - row) * rowSize : row * rowSize));
        buffidx = sizeof(sdbuffer);
        for (col=0; col<w; col++) {
          if (buffidx >= sizeof(sdbuffer)) {
            bmpFile.read(sdbuffer, sizeof(sdbuffer));
            buffidx = 0;
          }
          b = sdbuffer[buffidx++];
          g = sdbuffer[buffidx++];
          r = sdbuffer[buffidx++];
          tft.pushColor(tft.color565(r,g,b));
        }
      }
    }
  }
  bmpFile.close();
}

uint16_t read16(File &f) {
 uint16_t result;
 ((uint8_t *)&result)[0] = f.read();
 ((uint8_t *)&result)[1] = f.read(); 
 return result;
}
uint32_t read32(File &f) { 
  uint32_t result; 
  ((uint8_t *)&result)[0] = f.read(); 
  ((uint8_t *)&result)[1] = f.read(); 
  ((uint8_t *)&result)[2] = f.read(); 
  ((uint8_t *)&result)[3] = f.read(); 
  return result; 
}

Upload this code, and you should see the BMP images displayed on the ST7735 screen, changing every 1 second. This is shown in the gif below.

Gif showing the images from the SD card are displaying on the ST7735 screen.

Tip: If your image looks flipped or stretched, check its pixel dimensions and color depth. Also, ensure the filename and extension match exactly (e.g., image1.bmp, not Image1.BMP).


Common Errors and Troubleshooting Tips

Here are some common issues you might face while displaying images — and how to fix them:

  • SD Card initialization failed!
    → Check wiring of the SD_CS pin, ensure proper power supply, and confirm that the card is FAT32 formatted.
  • Blank or distorted image
    → The image is not in 24-bit BMP format or has an incorrect resolution.
  • File not found error
    → Ensure the filename is exact, including the lowercase .bmp extension.
  • Display flickering or resetting
    → Power supply may be insufficient. Use a stable 5V source with adequate current.
  • SPI conflicts between display and SD card
    → Double-check that both modules have separate CS pins and the SPI lines are not swapped.

Tips for Better Image Display

To get the best results on your 1.8-inch ST7735 display, keep these points in mind:

  • Use smaller images that match or are smaller than the screen resolution (128×160 pixels). Larger images may not display properly.
  • Save BMP images in 24-bit color format using tools like Paint or GIMP. The ST7735 library doesn’t support compressed or 32-bit BMP files.
  • Keep your SD card formatted as FAT32 for smooth file access and faster loading.
  • For faster image updates, use high-quality SD cards and shorter SPI wires.
  • Avoid connecting both the display and SD card to the same CS pin — each device must have its own Chip Select line.

Tip: If your images appear upside down or mirrored, you can adjust the screen orientation in software using:

tft.setRotation(1);

Values range from 0 to 3 depending on how your display is mounted.


Adjusting Brightness and Rotation

The brightness of the ST7735 display depends on the backlight (LED) pin. In most modules, it’s directly tied to 5V or 3.3V, but you can also connect it to a PWM pin on the Arduino to control brightness in code.

For example:

analogWrite(6, 180); // Set brightness (0–255)

Here, pin 6 is used as a PWM output. Adjust the value to make the screen dimmer or brighter.

For screen rotation, the command tft.setRotation(n) allows you to rotate the display by 0°, 90°, 180°, or 270°.
Try different values:

tft.setRotation(0); // Default orientation
tft.setRotation(1); // 90 degrees
tft.setRotation(2); // 180 degrees
tft.setRotation(3); // 270 degrees

This is useful when you want to display images in landscape or portrait orientation.

By now, your ST7735 with Arduino setup should be displaying images beautifully from the SD card. You’ve learned how to wire, program, and tune the display for better visual output, all using simple SPI communication.

Conclusion

In this tutorial, you learned how to use the 1.8-inch ST7735 TFT display with Arduino, from wiring it correctly to displaying colorful graphics and text. You also explored how to interface an SD card module with Arduino to show BMP images directly on the TFT screen.

We started with understanding the ST7735 display pinout, its specifications, and how to connect it using the SPI interface. Then, we set up the Arduino IDE by installing the required Adafruit ST7735 and Adafruit GFX libraries, followed by testing the display with a simple sketch.

Next, we moved on to drawing text, shapes, and colors, which helped demonstrate how easy it is to create custom graphics using the GFX library. Finally, we combined the SD card module to load and display BMP images, making your project more dynamic and visually appealing.

Browse More Arduino Tutorials

1 2

Arduino ST7735 Project Download

Info

You can help with the development by DONATING Below.
To download the project, click the DOWNLOAD button.

Arduino ST7735 Display FAQs

Subscribe
Notify of

0 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments