Skip to content

Commit f1cc380

Browse files
committed
Create code.py
Moved "import time" to the top of the code.
1 parent 2823e84 commit f1cc380

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import time
2+
import board
3+
import neopixel
4+
5+
6+
pixels = neopixel.NeoPixel(board.NEOPIXEL, 10, brightness=0.2, auto_write=False)
7+
PURPLE = (10, 0, 25)
8+
PINK = (25, 0, 10)
9+
OFF = (0,0,0)
10+
11+
while True:
12+
pixels.fill(PURPLE)
13+
pixels.show()
14+
time.sleep(0.5)
15+
pixels.fill(OFF)
16+
pixels.show()
17+
time.sleep(0.5)
18+
pixels.fill(PINK)
19+
pixels.show()
20+
time.sleep(0.5)
21+
pixels.fill(OFF)
22+
pixels.show()
23+
time.sleep(0.5)

0 commit comments

Comments
 (0)