Create code.py

Moved "import time" to the top of the code.
This commit is contained in:
TrevKnows 2021-09-13 16:56:25 -04:00
parent 2823e84cf0
commit f1cc3801f4

View file

@ -0,0 +1,23 @@
import time
import board
import neopixel
pixels = neopixel.NeoPixel(board.NEOPIXEL, 10, brightness=0.2, auto_write=False)
PURPLE = (10, 0, 25)
PINK = (25, 0, 10)
OFF = (0,0,0)
while True:
pixels.fill(PURPLE)
pixels.show()
time.sleep(0.5)
pixels.fill(OFF)
pixels.show()
time.sleep(0.5)
pixels.fill(PINK)
pixels.show()
time.sleep(0.5)
pixels.fill(OFF)
pixels.show()
time.sleep(0.5)