Files
AudioMixer/mpy/main.py
T
2026-09-07 14:40:16 +03:00

27 lines
853 B
Python

from machine import Pin, SPI
from time import sleep
from ili9341 import Display, color565
# TPM408-2.8 wiring on Pico (same as the C firmware)
BL = Pin(22, Pin.OUT, value=1)
Pin(6, Pin.OUT, value=1) # T_CS — keep touch off the bus
Pin(7, Pin.OUT, value=1) # SD_CS — keep SD off the bus
spi = SPI(0, baudrate=10_000_000, sck=Pin(18), mosi=Pin(19))
for rotation in (0, 90):
display = Display(spi, cs=Pin(17), dc=Pin(20), rst=Pin(21),
rotation=rotation)
print("rotation", rotation, "size", display.width, "x", display.height)
for name, rgb in (("red", (255, 0, 0)),
("green", (0, 255, 0)),
("blue", (0, 0, 255)),
("white", (255, 255, 255))):
print(" fill", name)
display.clear(color565(*rgb))
sleep(2)
print("done")