adafruit_rgb_display.rgb
¶
Base class for all RGB Display devices
- Author(s): Radomir Dopieralski, Michael McWethy
-
class
adafruit_rgb_display.rgb.
Display
(width, height, rotation)[source]¶ Base class for all RGB display devices :param width: number of pixels wide :param height: number of pixels high
-
fill_rectangle
(x, y, width, height, color)[source]¶ Draw a rectangle at specified position with specified width and height, and fill it with the specified color.
-
image
(img, rotation=None, x=0, y=0)[source]¶ Set buffer to value of Python Imaging Library image. The image should be in 1 bit mode and a size not exceeding the display size when drawn at the supplied origin.
-
rotation
¶ Set the default rotation
-
-
class
adafruit_rgb_display.rgb.
DisplaySPI
(spi, dc, cs, rst=None, width=1, height=1, baudrate=12000000, polarity=0, phase=0, *, x_offset=0, y_offset=0, rotation=0)[source]¶ Base class for SPI type devices
-
class
adafruit_rgb_display.rgb.
DummyPin
[source]¶ Can be used in place of a
DigitalInOut()
when you don’t want to skip it.-
direction
¶ Dummy direction DigitalInOut property
-
pull
¶ Dummy pull DigitalInOut property
-
value
¶ Dummy value DigitalInOut property
-
adafruit_rgb_display.hx8353
¶
A simple driver for the HX8353-based displays.
- Author(s): Radomir Dopieralski, Michael McWethy
-
class
adafruit_rgb_display.hx8353.
HX8353
(spi, dc, cs, rst=None, width=128, height=128, rotation=0)[source]¶ A simple driver for the HX8353-based displays.
>>> import busio >>> import digitalio >>> import board >>> from adafruit_rgb_display import color565 >>> import adafruit_rgb_display.hx8353 as hx8353 >>> spi = busio.SPI(clock=board.SCK, MOSI=board.MOSI, MISO=board.MISO) >>> display = hx8353.HX8383(spi, cs=digitalio.DigitalInOut(board.GPIO0), ... dc=digitalio.DigitalInOut(board.GPIO15)) >>> display.fill(0x7521) >>> display.pixel(64, 64, 0)
adafruit_rgb_display.ili9341
¶
A simple driver for the ILI9341/ILI9340-based displays.
- Author(s): Radomir Dopieralski, Michael McWethy
-
class
adafruit_rgb_display.ili9341.
ILI9341
(spi, dc, cs, rst=None, width=240, height=320, baudrate=16000000, polarity=0, phase=0, rotation=0)[source]¶ A simple driver for the ILI9341/ILI9340-based displays.
>>> import busio >>> import digitalio >>> import board >>> from adafruit_rgb_display import color565 >>> import adafruit_rgb_display.ili9341 as ili9341 >>> spi = busio.SPI(clock=board.SCK, MOSI=board.MOSI, MISO=board.MISO) >>> display = ili9341.ILI9341(spi, cs=digitalio.DigitalInOut(board.GPIO0), ... dc=digitalio.DigitalInOut(board.GPIO15)) >>> display.fill(color565(0xff, 0x11, 0x22)) >>> display.pixel(120, 160, 0)
adafruit_rgb_display.s6d02a1
¶
A simple driver for the S6D02A1-based displays.
- Author(s): Radomir Dopieralski, Michael McWethy
-
class
adafruit_rgb_display.s6d02a1.
S6D02A1
(spi, dc, cs, rst=None, width=128, height=160, rotation=0)[source]¶ A simple driver for the S6D02A1-based displays.
>>> import busio >>> import digitalio >>> import board >>> from adafruit_rgb_display import color565 >>> import adafruit_rgb_display.s6d02a1 as s6d02a1 >>> spi = busio.SPI(clock=board.SCK, MOSI=board.MOSI, MISO=board.MISO) >>> display = s6d02a1.S6D02A1(spi, cs=digitalio.DigitalInOut(board.GPIO0), ... dc=digitalio.DigitalInOut(board.GPIO15), rst=digitalio.DigitalInOut(board.GPIO16)) >>> display.fill(0x7521) >>> display.pixel(64, 64, 0)
adafruit_rgb_display.ssd1331
¶
A simple driver for the SSD1331-based displays.
- Author(s): Radomir Dopieralski, Michael McWethy
-
class
adafruit_rgb_display.ssd1331.
SSD1331
(spi, dc, cs, rst=None, width=96, height=64, baudrate=16000000, polarity=0, phase=0, *, rotation=0)[source]¶ A simple driver for the SSD1331-based displays.
import busio import digitalio import board from adafruit_rgb_display import color565 import adafruit_rgb_display.ssd1331 as ssd1331 spi = busio.SPI(clock=board.SCK, MOSI=board.MOSI, MISO=board.MISO) display = ssd1331.SSD1331(spi, cs=digitalio.DigitalInOut(board.GPIO0), dc=digitalio.DigitalInOut(board.GPIO15), rst=digitalio.DigitalInOut(board.GPIO16)) display.fill(0x7521) display.pixel(32, 32, 0)
adafruit_rgb_display.ssd1351
¶
A simple driver for the SSD1351-based displays.
- Author(s): Radomir Dopieralski, Michael McWethy
-
class
adafruit_rgb_display.ssd1351.
SSD1351
(spi, dc, cs, rst=None, width=128, height=128, baudrate=16000000, polarity=0, phase=0, *, x_offset=0, y_offset=0, rotation=0)[source]¶ A simple driver for the SSD1351-based displays.
>>> import busio >>> import digitalio >>> import board >>> from adafruit_rgb_display import color565 >>> import adafruit_rgb_display.ssd1351 as ssd1351 >>> spi = busio.SPI(clock=board.SCK, MOSI=board.MOSI, MISO=board.MISO) >>> display = ssd1351.SSD1351(spi, cs=digitalio.DigitalInOut(board.GPIO0), ... dc=digitalio.DigitalInOut(board.GPIO15), rst=digitalio.DigitalInOut(board.GPIO16)) >>> display.fill(0x7521) >>> display.pixel(32, 32, 0)
adafruit_rgb_display.st7735
¶
A simple driver for the ST7735-based displays.
- Author(s): Radomir Dopieralski, Michael McWethy
-
class
adafruit_rgb_display.st7735.
ST7735
(spi, dc, cs, rst=None, width=128, height=128, baudrate=16000000, polarity=0, phase=0, *, x_offset=0, y_offset=0, rotation=0)[source]¶ A simple driver for the ST7735-based displays.
>>> import busio >>> import digitalio >>> import board >>> from adafruit_rgb_display import color565 >>> import adafruit_rgb_display.st7735 as st7735 >>> spi = busio.SPI(clock=board.SCK, MOSI=board.MOSI, MISO=board.MISO) >>> display = st7735.ST7735(spi, cs=digitalio.DigitalInOut(board.GPIO0), ... dc=digitalio.DigitalInOut(board.GPIO15), rst=digitalio.DigitalInOut(board.GPIO16)) >>> display.fill(0x7521) >>> display.pixel(64, 64, 0)
adafruit_rgb_display.st7789
¶
A simple driver for the ST7789-based displays.
- Author(s): Melissa LeBlanc-Williams
-
class
adafruit_rgb_display.st7789.
ST7789
(spi, dc, cs, rst=None, width=240, height=320, baudrate=16000000, polarity=0, phase=0, *, x_offset=0, y_offset=0, rotation=0)[source]¶ A simple driver for the ST7789-based displays.
>>> import busio >>> import digitalio >>> import board >>> from adafruit_rgb_display import color565 >>> import adafruit_rgb_display.st7789 as st7789 >>> spi = busio.SPI(clock=board.SCK, MOSI=board.MOSI, MISO=board.MISO) >>> display = st7789.ST7789(spi, cs=digitalio.DigitalInOut(board.GPIO0), ... dc=digitalio.DigitalInOut(board.GPIO15), rst=digitalio.DigitalInOut(board.GPIO16)) >>> display.fill(0x7521) >>> display.pixel(64, 64, 0)