The T-Display-S3 AMOLED by LilyGo is a compact and vibrant display module designed for use in a wide range of electronics projects. Featuring an Active Matrix Organic Light Emitting Diode (AMOLED) screen, it provides excellent color reproduction, deep blacks, and high contrast ratios. This display is particularly well-suited for portable devices, wearables, and any application where a high-quality visual output is desired.
Pin Number | Pin Name | Description |
---|---|---|
1 | GND | Ground |
2 | VCC | Power supply (3.3V) |
3 | SCL | SPI clock line |
4 | SDA | SPI data line |
5 | RES | Reset line for the display controller |
6 | DC | Data/Command control pin |
7 | BLK | Backlight control pin |
#include <SPI.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
#define SCREEN_WIDTH 128 // OLED display width, in pixels
#define SCREEN_HEIGHT 64 // OLED display height, in pixels
// Declaration for an SSD1306 display connected to SPI
#define OLED_RESET 4 // Reset pin # (or -1 if sharing Arduino reset pin)
Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &SPI, OLED_DC, OLED_RESET, OLED_CS);
void setup() {
// Initialize with the I2C addr 0x3D (for the 128x64)
if(!display.begin(SSD1306_SWITCHCAPVCC, 0x3D)) {
Serial.println(F("SSD1306 allocation failed"));
for(;;);
}
display.display();
delay(2000); // Pause for 2 seconds
// Clear the buffer
display.clearDisplay();
// Draw a single pixel in white
display.drawPixel(10, 10, SSD1306_WHITE);
// Show the display buffer on the screen
display.display();
delay(2000); // Pause for 2 seconds
}
void loop() {
// Put your main code here, to run repeatedly:
}
Note: The above code is for illustration purposes only and may require modifications to work with the T-Display-S3 AMOLED. Please refer to the specific library and pin definitions for the T-Display-S3 AMOLED.
Q: Can I use the T-Display-S3 AMOLED with a 5V microcontroller? A: Yes, but you must use a level shifter to convert the 5V signals to 3.3V to avoid damaging the display.
Q: Is it possible to control the brightness of the display? A: Yes, the brightness can be controlled via the BLK pin using PWM.
Q: What library should I use for the T-Display-S3 AMOLED? A: Libraries that support SPI AMOLED displays, such as Adafruit's SSD1306 library, can be used. However, you may need to make adjustments for compatibility with the T-Display-S3 AMOLED's specific resolution and controller.
Q: How do I update the display content?
A: After drawing your content to the display buffer using the library's graphics functions, call the display()
function to update the screen.
Q: Can I use this display for full-motion video? A: While the AMOLED display is capable of high refresh rates, the SPI interface may limit the frame rate achievable. It is suitable for simple animations and user interfaces but may not be ideal for full-motion video.