Saving for pico

master
Drew Bednar 5 months ago
parent dd749fb0c2
commit 8ab3b69a15

3
.gitignore vendored

@ -2,4 +2,5 @@
.ftpconfig
.vscode/
main.py
ftp.py
ftp.py
env/

@ -0,0 +1 @@
SPI Video https://www.youtube.com/watch?v=suCTwxlYgnM

@ -79,8 +79,16 @@ def test():
"""Bouncing box."""
try:
# Baud rate of 40000000 seems about the max
spi = SPI(1, baudrate=40000000, sck=Pin(14), mosi=Pin(13))
display = Display(spi, dc=Pin(4), cs=Pin(16), rst=Pin(17))
spi = SPI(0,
baudrate=10000000, # pico 10Mhz
polarity=1, # what voltage level to set the clock signal to when in standby mode (not sending data)
phase=1, # Tells SPI wether it needs to sample data on first or second edge of the clock value.
bits=8, # Sets bits per data value
firstbit=SPI.MSB, # In which order should multiple byte data be sent. LCD panel expects Big Endian. So Most significant byte first
sck=Pin(18),
mosi=Pin(19),
miso=Pin(16)) # in this data you aren't sending any data back.
display = Display(spi, dc=Pin(15), cs=Pin(17), rst=Pin(14))
display.clear()
colors = [color565(255, 0, 0),
@ -106,5 +114,8 @@ def test():
except KeyboardInterrupt:
display.cleanup()
for i in range(0, 10, -1):
print(f"Starting in: {i}")
sleep_us(1000000)
test()

Loading…
Cancel
Save