The TFT 128x128 Colour I2C Blue PCB is a compact and versatile display module suitable for adding a visual interface to your electronics projects. With a resolution of 128x128 pixels, it can display detailed graphics and text in a multitude of colors. The use of a Thin Film Transistor (TFT) technology ensures vivid colors and high pixel response times, making it ideal for dynamic visual displays.
Common applications include:
Pin Number | Pin Name | Description |
---|---|---|
1 | GND | Ground |
2 | VCC | Power supply (3.3V - 5V) |
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) |
Q: What is the I2C address of the display? A: The I2C address for the display is typically 0x3C or 0x3D, but it can vary depending on the manufacturer. Consult the datasheet or use an I2C scanner sketch to determine the correct address.
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 to prevent damage to the display.
Q: How can I control the brightness of the display? A: Brightness control is typically done through software by adjusting the backlight control register in the display's controller.
Below is an example code snippet for initializing and displaying text on the TFT 128x128 Colour I2C Blue PCB using an Arduino UNO. This example assumes the use of a compatible TFT library.
#include <Wire.h>
#include <TFT.h> // Include the appropriate library for your display
// Define the pins
#define SCL_PIN A5
#define SDA_PIN A4
#define RES_PIN 9
#define DC_PIN 8
#define CS_PIN 10 // If not used, this can be set to -1
// Create an instance of the display
TFT myDisplay = TFT(CS_PIN, DC_PIN, RES_PIN);
void setup() {
// Initialize the display
myDisplay.begin();
// Set the orientation of the display
myDisplay.setRotation(1);
// Clear the screen with a black background
myDisplay.background(0, 0, 0);
// Set the text color to white
myDisplay.stroke(255, 255, 255);
// Set the text size
myDisplay.setTextSize(2);
// Display a text on the screen
myDisplay.text("Hello World!", 10, 10);
}
void loop() {
// Main loop does nothing in this example
}
Remember to replace #include <TFT.h>
with the actual library header for your specific TFT display, and ensure that the pin definitions match your wiring. The example code provided is a basic starting point and may require adjustments based on the specific library and display controller used.