kopia lustrzana https://github.com/peterhinch/micropython-micro-gui
ILI9486: Make pinouts consistent with PCB.
rodzic
4e59c85baf
commit
e2fb78818a
|
@ -11,10 +11,10 @@ import gc
|
||||||
from drivers.ili94xx.ili9486 import ILI9486 as SSD
|
from drivers.ili94xx.ili9486 import ILI9486 as SSD
|
||||||
freq(250_000_000) # RP2 overclock
|
freq(250_000_000) # RP2 overclock
|
||||||
|
|
||||||
pdc = Pin(17, Pin.OUT, value=0)
|
pdc = Pin(8, Pin.OUT, value=0) # Arbitrary pins
|
||||||
pcs = Pin(14, Pin.OUT, value=1)
|
prst = Pin(9, Pin.OUT, value=1)
|
||||||
prst = Pin(7, Pin.OUT, value=1)
|
pcs = Pin(10, Pin.OUT, value=1)
|
||||||
spi = SPI(0, sck=Pin(6), mosi=Pin(3), miso=Pin(4), baudrate=30_000_000)
|
spi = SPI(0, sck=Pin(6), mosi=Pin(7), miso=Pin(4), baudrate=30_000_000)
|
||||||
gc.collect() # Precaution before instantiating framebuf
|
gc.collect() # Precaution before instantiating framebuf
|
||||||
ssd = SSD(spi, pcs, pdc, prst)
|
ssd = SSD(spi, pcs, pdc, prst)
|
||||||
gc.collect()
|
gc.collect()
|
||||||
|
@ -25,5 +25,5 @@ nxt = Pin(19, Pin.IN, Pin.PULL_UP) # Move to next control
|
||||||
sel = Pin(16, Pin.IN, Pin.PULL_UP) # Operate current control
|
sel = Pin(16, Pin.IN, Pin.PULL_UP) # Operate current control
|
||||||
prev = Pin(18, Pin.IN, Pin.PULL_UP) # Move to previous control
|
prev = Pin(18, Pin.IN, Pin.PULL_UP) # Move to previous control
|
||||||
increase = Pin(20, Pin.IN, Pin.PULL_UP) # Increase control's value
|
increase = Pin(20, Pin.IN, Pin.PULL_UP) # Increase control's value
|
||||||
decrease = Pin(21, Pin.IN, Pin.PULL_UP) # Decrease control's value
|
decrease = Pin(17, Pin.IN, Pin.PULL_UP) # Decrease control's value
|
||||||
display = Display(ssd, nxt, sel, prev, increase, decrease) # Pushbutton control
|
display = Display(ssd, nxt, sel, prev, increase, decrease) # Pushbutton control
|
||||||
|
|
Ładowanie…
Reference in New Issue