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.2.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.2.tar.gz.

File metadata

File hashes

Hashes for adafruit_circuitpython_ili9341-2.0.2.tar.gz
Algorithm Hash digest
SHA256 e1820867edc8c520332e95267ac27ad3f5c35a71eeec2baa005a9e0f0cd0fa26
MD5 e9b94a3b45af2c33aa6c920c8f382113
BLAKE2b-256 aa15acf4f747b936aec07a53e1873bc3299b9be948f4cbb5b9c69c4fe36ccbe7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for adafruit_circuitpython_ili9341-2.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 7076c54fde840b2f985345dd62ebbda1b9ea24f82e659f4ad2d45ba77db760b8
MD5 441d946fa698ee4b456633f985c3ed0e
BLAKE2b-256 d76580ce253603ce975f8d272918c333354fffbb3c541cbd2a07390bb43c111b

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