File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change 16
16
i2c = busio .I2C (board .SCL , board .SDA )
17
17
18
18
# Create the LED bargraph class.
19
- bar = Bicolor24 (i2c )
19
+ bc24 = Bicolor24 (i2c )
20
20
21
21
# Set individual segments of bargraph
22
- bar [0 ] = bar .LED_RED
23
- bar [1 ] = bar .LED_GREEN
24
- bar [2 ] = bar .LED_YELLOW
22
+ bc24 [0 ] = bc24 .LED_RED
23
+ bc24 [1 ] = bc24 .LED_GREEN
24
+ bc24 [2 ] = bc24 .LED_YELLOW
25
25
26
26
time .sleep (2 )
27
27
28
28
# Turn them all off
29
- bar .fill (bar .LED_OFF )
29
+ bc24 .fill (bc24 .LED_OFF )
30
30
31
31
# Turn them on in a loop
32
32
for i in range (24 ):
33
- bar [i ] = bar .LED_RED
33
+ bc24 [i ] = bc24 .LED_RED
34
34
time .sleep (0.1 )
35
- bar [i ] = bar .LED_OFF
35
+ bc24 [i ] = bc24 .LED_OFF
36
36
37
37
time .sleep (1 )
38
38
39
39
# Fill the entrire bargraph
40
- bar .fill (bar .LED_GREEN )
40
+ bc24 .fill (bc24 .LED_GREEN )
You can’t perform that action at this time.
0 commit comments