Skip to product information

WaveShare OLED 1.8" Display SPI ST7735S Chipset
R 109.99 ZAR
The WaveShare OLED 1.8" Display features a high-performance ST7735S chipset, delivering sharp visuals through SPI communication. Its compact size makes it ideal for embedded systems, offering clear, vibrant graphics with low power consumption. Designed for seamless integration, this display suits expert developers seeking reliable performance in compact electronic projects.
Pickup currently not available

PRODUCT INFORMATION
Specifications
Spec | Value |
---|---|
VCC | Power (3.3V input) |
GND | Ground |
DIN | SPI data input |
CLK | SPI clock input |
CS | Chip selection, low active |
DC | Data/Command selection (high for data, low for command) |
RST | Reset, low active |
BL | Backlight |
/* |
WaveShare 1.8" SPI Display (ST7735S) — Quick Demo |
Board: Arduino UNO / Nano (5V). Works with any AVR/ESP; adjust pins as needed. |
Libraries (install via Library Manager): |
- Adafruit GFX Library |
- Adafruit ST7735 and ST7789 Library |
Typical Waveshare pinout: |
VCC -> 5V (or 3.3V, module dependent) |
GND -> GND |
DIN -> MOSI (UNO D11) |
CLK -> SCK (UNO D13) |
CS -> D10 (TFT_CS) |
DC -> D9 (TFT_DC) |
RST -> D8 (TFT_RST) |
BL -> 3.3V (or a PWM-capable pin via 100-330Ω if you want dimming) |
Notes: |
- ST7735S often uses INITR_BLACKTAB; if colors look off, try INITR_GREENTAB or INITR_18GREENTAB. |
- Set rotation to 1 for landscape 160x128; 0 for portrait 128x160. |
*/ |
#include <Adafruit_GFX.h> |
#include <Adafruit_ST7735.h> |
#include <SPI.h> |
// ---------- Pin configuration (UNO defaults) ---------- |
#define TFT_CS 10 |
#define TFT_DC 9 |
#define TFT_RST 8 // You can use -1 if RST is tied to Arduino RESET |
Adafruit_ST7735 tft(TFT_CS, TFT_DC, TFT_RST); |
// ---------- Handy colors ---------- |
#define C_BG ST77XX_BLACK |
#define C_TXT ST77XX_WHITE |
#define C_ACC ST77XX_CYAN |
#define C_RED ST77XX_RED |
#define C_GRN ST77XX_GREEN |
#define C_BLU ST77XX_BLUE |
#define C_YEL ST77XX_YELLOW |
#define C_MAG ST77XX_MAGENTA |
// ---------- Optional: backlight PWM (comment out if BL tied to VCC) ---------- |
// #define TFT_BL 5 // pick a PWM pin if you wired BL to a pin |
// uint8_t backlight = 255; // 0-255 |
void demoPrimitives() { |
tft.fillScreen(C_BG); |
// Borders |
tft.drawRect(0, 0, tft.width(), tft.height(), C_ACC); |
tft.drawRect(2, 2, tft.width()-4, tft.height()-4, ST77XX_DARKGREY); |
// Lines |
for (int i=0; i< tft.width(); i+=10) { |
tft.drawLine(0, 0, i, tft.height()-1, C_BLU); |
} |
delay(500); |
tft.fillRect(0, 0, tft.width(), tft.height(), C_BG); |
// Circles |
for (int r=4; r< (tft.height()/2); r+=6) { |
tft.drawCircle(tft.width()/2, tft.height()/2, r, C_GRN); |
} |
delay(500); |
// Filled rectangles |
tft.fillRect(6, 6, 40, 30, C_RED); |
tft.fillRect(52, 6, 40, 30, C_GRN); |
tft.fillRect(98, 6, 40, 30, C_BLU); |
delay(500); |
} |
void demoText() { |
tft.fillScreen(C_BG); |
tft.setCursor(2, 2); |
tft.setTextColor(C_TXT); |
tft.setTextWrap(true); |
tft.setTextSize(1); |
tft.println(F("WaveShare 1.8\" ST7735S")); |
tft.setTextColor(C_YEL); |
tft.println(F("SPI demo (Adafruit GFX)")); |
tft.setTextColor(C_TXT); |
tft.println(); |
tft.setTextSize(1); |
tft.print(F("Resolution: ")); |
tft.print(tft.width()); |
tft.print('x'); |
tft.println(tft.height()); |
tft.setTextColor(C_MAG); |
tft.println(F("Draw test...")); |
delay(900); |
} |
void gradientBars() { |
// Simple color sweep |
for (int x = 0; x < tft.width(); x++) { |
uint8_t r = map(x, 0, tft.width()-1, 0, 255); |
uint16_t color = tft.color565(r, 50, 255 - r); |
tft.drawFastVLine(x, 0, tft.height(), color); |
} |
delay(600); |
} |
void setup() { |
// Optional BL control: |
// pinMode(TFT_BL, OUTPUT); |
// analogWrite(TFT_BL, backlight); |
// Initialize display |
tft.initR(INITR_BLACKTAB); // try INITR_GREENTAB if colors look wrong |
tft.setRotation(1); // 1 = landscape (160x128). Use 0 for portrait (128x160) |
// Clear and greet |
tft.fillScreen(C_BG); |
tft.setTextWrap(false); |
tft.setTextSize(1); |
tft.setTextColor(C_TXT); |
// Quick “hello” banner |
tft.fillRect(0, 0, tft.width(), 14, C_ACC); |
tft.setCursor(4, 3); |
tft.setTextColor(C_BG); |
tft.print(F("WaveShare 1.8\" ST7735S")); |
delay(400); |
demoPrimitives(); |
demoText(); |
gradientBars(); |
// Tiny FPS-ish fill test |
uint32_t t0 = millis(); |
for (int i=0; i<50; i++) { |
uint16_t color = tft.color565(random(255), random(255), random(255)); |
int x = random(tft.width()-30); |
int y = random(tft.height()-20); |
tft.fillRect(x, y, 30, 20, color); |
} |
uint32_t t1 = millis(); |
tft.fillScreen(C_BG); |
tft.setCursor(2, 2); |
tft.setTextColor(C_TXT); |
tft.setTextSize(1); |
tft.println(F("Random fill test:")); |
tft.print(F("Time: ")); |
tft.print(t1 - t0); |
tft.println(F(" ms")); |
tft.println(F("(Lower is faster)")); |
} |
void loop() { |
// Simple loop animation: moving bar |
static int x = 0; |
static int dx = 3; |
// Clear a narrow strip |
tft.fillRect(0, tft.height()-16, tft.width(), 16, C_BG); |
// Draw bar |
tft.fillRect(x, tft.height()-14, 32, 12, C_YEL); |
x += dx; |
if (x < 0 || x + 32 > tft.width()) dx = -dx; |
delay(30); |
} |