The ST7735 128x128 1.44" TFT I2C Color Display is a compact and versatile display module capable of rendering colorful graphics and text. It is widely used in embedded systems, handheld devices, and user interfaces where space is at a premium. With its I2C communication protocol, it simplifies the connectivity and reduces the pin usage on microcontrollers, such as the Arduino UNO.
Pin Number | Pin Name | Description |
---|---|---|
1 | VCC | Power supply (3.3V - 5V) |
2 | GND | Ground |
3 | SCL | I2C clock signal |
4 | SDA | I2C data signal |
5 | RES | Reset pin (active low) |
6 | DC | Data/Command control pin |
7 | CS | Chip Select (active low, optional) |
8 | BL | Backlight control (optional) |
#include <Wire.h> // Include Wire library for I2C communication
#include <Adafruit_GFX.h> // Include core graphics library
#include <Adafruit_ST7735.h> // Include hardware-specific library for ST7735
// Define pin connections
#define TFT_CS 10 // Chip select line for TFT display
#define TFT_RST 9 // Reset line for TFT (or connect to +5V)
#define TFT_DC 8 // Data/command line for TFT
// Create display object
Adafruit_ST7735 tft = Adafruit_ST7735(TFT_CS, TFT_DC, TFT_RST);
void setup() {
tft.initR(INITR_144GREENTAB); // Initialize display with correct tab color
tft.fillScreen(ST7735_BLACK); // Clear screen with black background
}
void loop() {
tft.setCursor(0, 0); // Set cursor at top-left corner
tft.setTextColor(ST7735_WHITE); // Set text color to white
tft.setTextWrap(true); // Set text to wrap at end of screen
tft.print("Hello, World!"); // Print text to screen
}
Q: Can I use this display with a 5V microcontroller? A: Yes, but ensure that the logic levels are compatible or use a level shifter.
Q: How can I control the brightness of the backlight? A: Connect the BL pin to a PWM-capable pin on your microcontroller and adjust the duty cycle to control brightness.
Q: What library should I use with this display? A: The Adafruit ST7735 library is recommended for easy integration and use with Arduino platforms.
Q: How do I update the display content?
A: Use the functions provided by the Adafruit GFX and ST7735 libraries to draw text, shapes, and images, and then call display()
to update the screen.
Q: Can I display images on the ST7735? A: Yes, you can display images by converting them to the appropriate format and using the library's image drawing functions.