File tree Expand file tree Collapse file tree 2 files changed +43
-19
lines changed
Expand file tree Collapse file tree 2 files changed +43
-19
lines changed Original file line number Diff line number Diff line change 1+
2+ # https://wiki.dfrobot.com/FireBeetle_Board_ESP32_E_SKU_DFR0654
3+ # https://docs.micropython.org/en/latest/library/neopixel.html
4+
5+ from machine import Pin
6+ from neopixel import NeoPixel
7+ import time
8+
9+
10+ np = NeoPixel (Pin (5 ), 1 )
11+
12+ # Draw a red gradient
13+ for i in range (16 ):
14+ np [0 ] = (i * 8 , 0 , 0 )
15+ np .write ()
16+ time .sleep (.1 )
17+
18+ np [0 ] = (128 , 128 , 0 )
19+ np .write ()
20+ time .sleep (1 )
21+
22+ np [0 ] = (0 , 128 , 0 )
23+ np .write ()
24+ time .sleep (1 )
25+
26+ np [0 ] = (0 , 128 , 128 )
27+ np .write ()
28+ time .sleep (1 )
29+
30+ np [0 ] = (0 , 0 , 128 )
31+ np .write ()
32+ time .sleep (1 )
33+
34+ np [0 ] = (128 , 0 , 128 )
35+ np .write ()
36+ time .sleep (1 )
37+
38+ np [0 ] = (128 , 0 , 0 )
39+ np .write ()
40+ time .sleep (1 )
41+
42+ np [0 ] = (0 , 0 , 0 )
43+ np .write ()
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments