

📺 Small Screen, Big Impact: Elevate your embedded projects with vibrant clarity!
The Waveshare 2-inch IPS LCD Display Module features a 240×320 resolution with 262K RGB colors, driven by the ST7789V controller. Its compact size and efficient 4-wire SPI interface reduce GPIO usage while delivering vivid visuals. Compatible with 3.3V and 5V systems, it comes with extensive developer resources and demos for Raspberry Pi, STM32, and Arduino, making it an ideal choice for professional embedded applications.
| ASIN | B082GFTZQD |
| Are Batteries Included | No |
| Best Sellers Rank | #38,888 in Computers ( See Top 100 in Computers ) #1,741 in Computer Monitors |
| Brand | Waveshare |
| Color | 2inch IPS LCD Display Module |
| Customer Reviews | 4.1 4.1 out of 5 stars (357) |
| Date First Available | 7 December 2019 |
| Item Weight | 18 g |
| Item model number | 2inch IPS LCD Display Module |
| Manufacturer | Waveshare |
| Number of HDMI Ports | 1 |
| Package Dimensions | 7.11 x 5.21 x 2.21 cm; 18 g |
| Processor Count | 1 |
| Resolution | 240x320 |
| Screen Resolution | 240 x 320 |
| Series | 2inch IPS LCD Display Module |
| Standing screen display size | 2 Inches |
| Voltage | 3.3 Volts |
A**X
P**S
Good product. Working excellent.
L**H
Purchased as an upgrade from the 0.96 generic oled screen I've been using on a handy diy device I've come to rely on. Pi 4 with 5 inch touchscreen with software for a neurological disorder that impairs movement, pattern recognition being able to predict when myclonic seizures are likely to a high degree of accuracy greatly improved life but a bit bulky. Set up a pi zero W 2/this hat for the same function, within 48 hours the screen became very hot around the three buttons then when I picked it up the screen opened up like a notepad with little slips of paper falling out everywhere. I'll have to get out the helping hands and fluke but I suspect a fault spawning from key 2. The pi zero 2s SD card slot sustained some damage. I've been a Pi uptaker since the 2B, my work station is a souped up Pi 5, my media centre a pi 4B; never had an issue with anything Pi before. Dam.
M**N
I managed to get this to work with my XIAO ESP32S3 Sense board, which I was super happy about. So far I’ve only managed to draw shapes and print text on the screen but it’s very bright and the colors are crisp for such a cheap display. I’m not a fan of the cable that comes with it. It’s hard to push into the connector on the board and the DuPont connectors on the other end are female. It would have been nice for the DuPont connectors to be male so I can plug them into a breadboard. Alternatively, it would have been nice to include some header pins which I could solder. It’s only a minor inconvenience for a product which pretty much delivers in all other aspects.
S**L
I had trouble finding a micro python library to use the LCD with my Raspberry Pi Pico so I had CoPilot help me develop this following library. Feel free to use it. import framebuf import time from machine import Pin, SPI # Constants for the ST7789 commands ST7789_NOP = 0x00 ST7789_SWRESET = 0x01 ST7789_RDDID = 0x04 ST7789_RDDST = 0x09 ST7789_SLPIN = 0x10 ST7789_SLPOUT = 0x11 ST7789_PTLON = 0x12 ST7789_NORON = 0x13 ST7789_INVOFF = 0x20 ST7789_INVON = 0x21 ST7789_DISPOFF = 0x28 ST7789_DISPON = 0x29 ST7789_CASET = 0x2A ST7789_RASET = 0x2B ST7789_RAMWR = 0x2C ST7789_RAMRD = 0x2E ST7789_PTLAR = 0x30 ST7789_COLMOD = 0x3A ST7789_MADCTL = 0x36 ST7789_MADCTL_MY = 0x80 ST7789_MADCTL_MX = 0x40 ST7789_MADCTL_MV = 0x20 ST7789_MADCTL_ML = 0x10 ST7789_MADCTL_RGB = 0x00 COLOR_MODE_65K = 0x50 COLOR_MODE_262K = 0x60 COLOR_MODE_12BIT = 0x03 COLOR_MODE_16BIT = 0x05 COLOR_MODE_18BIT = 0x06 COLOR_MODE_16M = 0x07 class ST7789: def __init__(self, spi, cs, dc, rst, width=320, height=240): self.spi = spi self.cs = cs self.dc = dc self.rst = rst self.width = width self.height = height self.buffer = bytearray(self.width * self.height * 2) self.framebuf = framebuf.FrameBuffer(self.buffer, self.width, self.height, framebuf.RGB565) self.cs.init(self.cs.OUT, value=1) self.dc.init(self.dc.OUT, value=0) self.rst.init(self.rst.OUT, value=1) self.reset() self.init_display() def reset(self): self.rst(1) time.sleep_ms(50) self.rst(0) time.sleep_ms(50) self.rst(1) time.sleep_ms(50) def write_cmd(self, cmd): self.cs(0) self.dc(0) self.spi.write(bytearray([cmd])) self.cs(1) def write_data(self, data): self.cs(0) self.dc(1) self.spi.write(bytearray([data])) self.cs(1) def init_display(self): self.write_cmd(ST7789_SWRESET) time.sleep_ms(150) self.write_cmd(ST7789_SLPOUT) time.sleep_ms(500) self.write_cmd(ST7789_COLMOD) self.write_data(COLOR_MODE_16BIT) time.sleep_ms(10) self.write_cmd(ST7789_MADCTL) self.write_data(ST7789_MADCTL_MY | ST7789_MADCTL_MV | ST7789_MADCTL_RGB) self.set_window(0, 0, self.width - 1, self.height - 1) self.write_cmd(ST7789_INVON) time.sleep_ms(10) self.write_cmd(ST7789_NORON) time.sleep_ms(10) self.write_cmd(ST7789_DISPON) time.sleep_ms(500) def show(self): self.set_window(0, 0, self.width - 1, self.height - 1) self.write_cmd(ST7789_RAMWR) self.cs(0) self.dc(1) self.spi.write(self.buffer) self.cs(1) def set_window(self, x0, y0, x1, y1): self.write_cmd(ST7789_CASET) self.write_data(x0 >> 8) self.write_data(x0 & 0xFF) self.write_data(x1 >> 8) self.write_data(x1 & 0xFF) self.write_cmd(ST7789_RASET) self.write_data(y0 >> 8) self.write_data(y0 & 0xFF) self.write_data(y1 >> 8) self.write_data(y1 & 0xFF) self.write_cmd(ST7789_RAMWR) def rotate(self, rotation): self.write_cmd(ST7789_MADCTL) if rotation == 0: self.write_data(ST7789_MADCTL_MX | ST7789_MADCTL_MY | ST7789_MADCTL_RGB) self.width, self.height = 240, 320 elif rotation == 1: self.write_data(ST7789_MADCTL_MY | ST7789_MADCTL_MV | ST7789_MADCTL_RGB) self.width, self.height = 320, 240 elif rotation == 2: self.write_data(ST7789_MADCTL_RGB) self.width, self.height = 240, 320 elif rotation == 3: self.write_data(ST7789_MADCTL_MX | ST7789_MADCTL_MV | ST7789_MADCTL_RGB) self.width, self.height = 320, 240 self.framebuf = framebuf.FrameBuffer(self.buffer, self.width, self.height, framebuf.RGB565) self.set_window(0, 0, self.width - 1, self.height - 1) def draw_pixel(self, x, y, color): self.framebuf.pixel(x, y, color) def draw_line(self, x0, y0, x1, y1, color): self.framebuf.line(x0, y0, x1, y1, color) def draw_rect(self, x, y, w, h, color): self.framebuf.rect(x, y, w, h, color) def fill_rect(self, x, y, w, h, color): self.framebuf.fill_rect(x, y, w, h, color) def draw_triangle(self, x0, y0, x1, y1, x2, y2, color): self.draw_line(x0, y0, x1, y1, color) self.draw_line(x1, y1, x2, y2, color) self.draw_line(x2, y2, x0, y0, color) def fill_triangle(self, x0, y0, x1, y1, x2, y2, color): def draw_line(x0, y0, x1, y1): dx = abs(x1 - x0) dy = abs(y1 - y0) sx = 1 if x0 < x1 else -1 sy = 1 if y0 < y1 else -1 err = dx - dy while True: self.framebuf.pixel(x0, y0, color) if x0 == x1 and y0 == y1: break e2 = err * 2 if e2 > -dy: err -= dy x0 += sx if e2 < dx: err += dx y0 += sy if y0 > y1: x0, y0, x1, y1 = x1, y1, x0, y0 if y0 > y2: x0, y0, x2, y2 = x2, y2, x0, y0 if y1 > y2: x1, y1, x2, y2 = x2, y2, x1, y1 if y1 == y2: a = x0 b = x0 if x1 < a: a = x1 elif x1 > b: b = x1 if x2 < a: a = x2 elif x2 > b: b = x2 draw_line(a, y1, b, y1) else: dx01 = x1 - x0 dy01 = y1 - y0 dx02 = x2 - x0 dy02 = y2 - y0 dx12 = x2 - x1 dy12 = y2 - y1 sa = 0 sb = 0 if y1 == y2: last = y1 else: last = y1 - 1 for y in range(y0, last + 1): a = x0 + sa // dy01 b = x0 + sb // dy02 sa += dx01 sb += dx02 if a > b: a, b = b, a draw_line(a, y, b, y) sa = dx12 * (y - y1) sb = dx02 * (y - y0) for y in range(last + 1, y2 + 1): a = x1 + sa // dy12 b = x0 + sb // dy02 sa += dx12 sb += dx02 if a > b: a, b = b, a draw_line(a, y, b, y) def draw_circle(self, x0, y0, r, color): f = 1 - r ddF_x = 1 ddF_y = -2 * r x = 0 y = r self.framebuf.pixel(x0, y0 + r, color) self.framebuf.pixel(x0, y0 - r, color) self.framebuf.pixel(x0 + r, y0, color) self.framebuf.pixel(x0 - r, y0, color) while x < y: if f >= 0: y -= 1 ddF_y += 2 f += ddF_y x += 1 ddF_x += 2 f += ddF_x self.framebuf.pixel(x0 + x, y0 + y, color) self.framebuf.pixel(x0 - x, y0 + y, color) self.framebuf.pixel(x0 + x, y0 - y, color) self.framebuf.pixel(x0 - x, y0 - y, color) self.framebuf.pixel(x0 + y, y0 + x, color) self.framebuf.pixel(x0 - y, y0 + x, color) self.framebuf.pixel(x0 + y, y0 - x, color) self.framebuf.pixel(x0 - y, y0 - x, color) def fill_circle(self, x0, y0, r, color): self.draw_line(x0, y0 - r, x0, y0 + r, color) f = 1 - r ddF_x = 1 ddF_y = -2 * r x = 0 y = r while x < y: if f >= 0: y -= 1 ddF_y += 2 f += ddF_y x += 1 ddF_x += 2 f += ddF_x self.draw_line(x0 + x, y0 - y, x0 + x, y0 + y, color) self.draw_line(x0 - x, y0 - y, x0 - x, y0 + y, color) self.draw_line(x0 + y, y0 - x, x0 + y, y0 + x, color) self.draw_line(x0 - y, y0 - x, x0 - y, y0 + x, color) def draw_image(self, x, y, img_data, img_width, img_height): for j in range(img_height): for i in range(img_width): color = img_data[j * img_width + i] self.draw_pixel(x + i, y + j, color)
Trustpilot
2 months ago
2 weeks ago