Welcome to MicroPython Adafruit RGB Displays’s documentation!

Contents:

Display Module

Utilities

rgb.color565(r, g, b)

Convert red, green and blue values (0-255) into a 16-bit 565 encoding.

class rgb.DummyPin

Can be used in place of a Pin() when you want to skip it.

Display Class

This is the interface that all the display classes share.

class rgb.Display(width, height)
init()

Run the initialization commands for the given display (ran automatically when the object is created).

pixel(x, y, color)

Get or set the value of a pixel at the given position.

fill_rectangle(x, y, width, height, color)

Draw a rectangle at specified position with specified width and height, and fill it with the specified color.

fill(color)

Fill the whole display with the specified color.

hline(x, y, width, color)

Draw a horizontal line.

vline(x, y, height, color)

Draw a vertical line.

..method:: blit_buffer(buffer, x, y, width, height)

Copy the pixels from the buffer onto the display, starting at position (x, y) and assuming the copied area has width width and height height. The area has to fit entirely inside the display

List of Supported Displays

All of those displays support the methods of the Display class.

class hx8353.HX8353(spi, dc, cs, rst=None, width=128, height=128)

A TFT display.

class ili9341.ILI9241(spi, dc, cs, rst=None, width=240, height=320)

A TFT display.

scroll(dy=None)

Get or set the vertical scroll position.

class s6d02a1.S6D02A1(spi, dc, cs, rst=None, width=128, height=160)

A TFT display.

class ssd1331.SSD1331(spi, dc, cs, rst=None, widht=96, height=64)

An OLED display.

class ssd1351.SSD1351(spi, dc, cs, rst=None, width=128, height=128)

An OLED display.

class st7735.ST7735(spi, dc, cs, rst=None, width=128, height=128)

A TFT display.

Indices and tables