import time
time.sleep(0.1) # Wait for USB to become ready
print("Hello, Pi Pico!")
from machine import Pin
from neopixel import NeoPixel
table=((1,1,0,0,0,0,0,0),(0,0,1,1,0,0,0,0),
(0,0,0,0,1,1,0,0),(0,0,0,0,0,1,1,1))
pin1= Pin(22, Pin.OUT) # set GPIO0 to output to drive NeoPixels
np1 = NeoPixel(pin1,8) # create NeoPixel driver on GPIO0 for 8 pixels
for i in range(8):
np1[i] = (255, 255, 255)
np1.write()
while True:
for i in range(4):
for j in range(8):
if table[i][j]==1:
np1[j] = (0, 0, 255)
else:
np1[j] = (255, 255, 255)
np1.write()
time.sleep(0.3)