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

File metadata

File hashes

Hashes for adafruit_circuitpython_ili9341-2.0.4.tar.gz
Algorithm Hash digest
SHA256 5e81049b573eae9b4229d4191cdf7f549dfbd16c8fd036e30712ceae0113050a
MD5 4beb352085c08486ce2f707b4448f4b4
BLAKE2b-256 ca6602b1a6010b234cdabb154ae111efbbd0f042f7427d0fed2462724ee99a7f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for adafruit_circuitpython_ili9341-2.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 daa851be607ad2bafb3ef20a8a50e032bbdf09a2948f0ac7eae998bd06dbbceb
MD5 479e88c6ca69a58f178b92e7a0cb669b
BLAKE2b-256 cd2823a6b744f3e7ff43ca13e62a3b45387febc86494181d8fdfcdd793da5386

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