Skip to content

Commit ccabfe7

Browse files
committed
neopixel examples updated
1 parent 312958e commit ccabfe7

File tree

5 files changed

+19
-0
lines changed

5 files changed

+19
-0
lines changed

examples/main.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
2+
# https://wiki.dfrobot.com/FireBeetle_Board_ESP32_E_SKU_DFR0654
3+
# https://docs.micropython.org/en/latest/library/neopixel.html
4+
5+
import machine
6+
import neopixel
7+
import time
8+
9+
10+
p = machine.Pin(5)
11+
n = neopixel.NeoPixel(p, 1)
12+
13+
# Draw a red gradient
14+
for i in range(32):
15+
n = (i * 8, 0, 0)
16+
time.sleep(.1)
17+
18+
# Update the strip.
19+
n.write()

0 commit comments

Comments
 (0)