We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents d13eb41 + 6385ea0 commit 9696dddCopy full SHA for 9696ddd
Circuit_Playground_Bluefruit_NeoPixel_Controller/Controller.py
@@ -87,7 +87,10 @@ def send_packet(uart_connection_name, packet):
87
time.sleep(0.05) # Debounce.
88
if cpb.switch is not last_switch_state: # If the switch state is changed...
89
last_switch_state = cpb.switch # Set state to current switch state.
90
- print("Switch is to the", "left: LEDs off!" if cpb.switch else "right: LEDs on!")
+ if cpb.switch:
91
+ print("Switch is to the left: LEDs off!")
92
+ else:
93
+ print("Switch is to the right: LEDs on!")
94
# Send a BUTTON_1 button packet.
95
if not send_packet(uart_connection,
96
ButtonPacket(ButtonPacket.BUTTON_1, pressed=cpb.switch)):
0 commit comments