Skip to main content

displayio driver for ILI9341 and ILI9340 TFT-LCD displays.

Project description

Introduction

Documentation Status Discord Build Status Code Style: Ruff

displayio driver for ILI9341 and ILI9340 TFT-LCD displays.

Dependencies

This driver depends on:

Please ensure all dependencies are available on the CircuitPython filesystem. This is easily achieved by downloading the Adafruit library and driver bundle.

Usage Example

import board
import displayio
import fourwire
import adafruit_ili9341

# If you use explicit pins with busio.SPI(...), calling release_displays() first
# prevents "pin in use" errors on subsequent reloads.
displayio.release_displays()

spi = board.SPI()
tft_cs = board.D9
tft_dc = board.D10

display_bus = fourwire.FourWire(spi, command=tft_dc, chip_select=tft_cs)

display = adafruit_ili9341.ILI9341(display_bus, width=320, height=240)

# Make the display context
splash = displayio.Group()
display.root_group = splash

color_bitmap = displayio.Bitmap(320, 240, 1)
color_palette = displayio.Palette(1)
color_palette[0] = 0xFF0000

bg_sprite = displayio.TileGrid(color_bitmap,
                            pixel_shader=color_palette,
                            x=0, y=0)
splash.append(bg_sprite)

while True:
    pass

Documentation

API documentation for this library can be found on Read the Docs.

For information on building library documentation, please check out this guide.

Contributing

Contributions are welcome! Please read our Code of Conduct before contributing to help this project stay welcoming.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

adafruit_circuitpython_ili9341-2.0.3.tar.gz (23.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file adafruit_circuitpython_ili9341-2.0.3.tar.gz.

File metadata

File hashes

Hashes for adafruit_circuitpython_ili9341-2.0.3.tar.gz
Algorithm Hash digest
SHA256 4462abb18e487efecaf4985c1df17af0293f25eabdab4175436fc7dd3307f0c8
MD5 0feed68305445fa97e20a7042c3d7de0
BLAKE2b-256 ddd5f136961ceab6b6ed702d560e0211c5cbc6ad7de14cc131cb41259dfebf5a

See more details on using hashes here.

File details

Details for the file adafruit_circuitpython_ili9341-2.0.3-py3-none-any.whl.

File metadata

File hashes

Hashes for adafruit_circuitpython_ili9341-2.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 d4ae45055346e02a7b3af3660eaeb0bea1bd24a134c057d402ae9ed3be4b39e1
MD5 efc2db7a03249c16167f1f7f6a6fc585
BLAKE2b-256 887917834df06df584b21808487f7157a255e0a341434ae12b664042ef075d37

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page