micropython-nano-gui/color_setup.py

19 wiersze
525 B
Python

2024-05-13 17:04:52 +00:00
# ili9486_pico.py Customise for your hardware config and rename
2020-11-03 18:43:24 +00:00
# Released under the MIT License (MIT). See LICENSE.
2024-05-13 17:04:52 +00:00
# ILI9486 on Pi Pico
# See DRIVERS.md for wiring details.
from machine import Pin, SPI
2020-11-03 18:43:24 +00:00
import gc
2024-05-13 17:04:52 +00:00
from drivers.ili94xx.ili9486 import ILI9486 as SSD
pdc = Pin(8, Pin.OUT, value=0)
prst = Pin(9, Pin.OUT, value=1)
pcs = Pin(10, Pin.OUT, value=1)
2024-05-13 17:04:52 +00:00
spi = SPI(0, sck=Pin(6), mosi=Pin(7), miso=Pin(4), baudrate=30_000_000)
2020-11-03 18:43:24 +00:00
gc.collect() # Precaution before instantiating framebuf
2024-05-13 17:04:52 +00:00
ssd = SSD(spi, pcs, pdc, prst)