File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
Circuit_Playground_Bluefruiit_NeoPixel_Controller Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 93
93
elif isinstance (packet , ButtonPacket ): # If the packet is a button packet...
94
94
# Check to see if it's BUTTON_1 (which is being sent by the slide switch)
95
95
if packet .button == ButtonPacket .BUTTON_1 :
96
- print ("Controller switch is to the" , "left: LEDs off!" if packet .pressed
97
- else "right: LEDs on!" )
98
- # If the controller switch is moved to the left...
96
+ if packet .pressed : # If controller switch is to the left...
97
+ print ("Controller switch is to the left: LEDs off!" )
98
+ else : # If the controller switch is to the right...
99
+ print ("Controller switch is to the right: LEDs on!" )
100
+ # If the controller switch is moved from right to left...
99
101
if packet .pressed and not blanked :
100
102
animations .fill (color .BLACK ) # Turn off the LEDs.
101
103
blanked = packet .pressed # Track the state of the slide switch.
You can’t perform that action at this time.
0 commit comments