Skip to content

Commit 0aae1a4

Browse files
authored
Merge pull request adafruit#963 from kattni/update-controller-reference
Update references to 'controller'.
2 parents 636da28 + d41c9cb commit 0aae1a4

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

Circuit_Playground_Bluefruit_NeoPixel_Controller/NeoPixel_Animator.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
# Setup for blink animation
2626
BLINK_SPEED = 0.5 # Lower numbers increase the animation speed
27-
BLINK_INITIAL_COLOR = color.RED # Color before controller is connected
27+
BLINK_INITIAL_COLOR = color.RED # Color before Remote Control is connected
2828

2929
# Setup for comet animation
3030
COMET_SPEED = 0.03 # Lower numbers increase the animation speed
@@ -75,7 +75,7 @@
7575
animations.animate() # Run the animations.
7676
if ble.connected: # If BLE is connected...
7777
was_connected = True
78-
if uart.in_waiting: # Check to see if any data is available from the controller.
78+
if uart.in_waiting: # Check to see if any data is available from the Remote Control.
7979
try:
8080
packet = Packet.from_stream(uart) # Create the packet object.
8181
except ValueError:
@@ -91,15 +91,15 @@
9191
elif isinstance(packet, ButtonPacket): # If the packet is a button packet...
9292
# Check to see if it's BUTTON_1 (which is being sent by the slide switch)
9393
if packet.button == ButtonPacket.BUTTON_1:
94-
if packet.pressed: # If controller switch is to the left...
95-
print("Controller switch is to the left: LEDs off!")
96-
else: # If the controller switch is to the right...
97-
print("Controller switch is to the right: LEDs on!")
98-
# If the controller switch is moved from right to left...
94+
if packet.pressed: # If Remote Control switch is to the left...
95+
print("Remote Control switch is to the left: LEDs off!")
96+
else: # If the Remote Control switch is to the right...
97+
print("Remote Control switch is to the right: LEDs on!")
98+
# If the Remote Control switch is moved from right to left...
9999
if packet.pressed and not blanked:
100100
animations.fill(color.BLACK) # Turn off the LEDs.
101101
blanked = packet.pressed # Track the state of the slide switch.
102-
if packet.pressed: # If the buttons on the controller are pressed...
102+
if packet.pressed: # If the buttons on the Remote Control are pressed...
103103
if packet.button == ButtonPacket.LEFT: # If button A is pressed...
104104
print("A pressed: animation mode changed.")
105105
animations.next() # Change to the next animation.

Circuit_Playground_Bluefruit_NeoPixel_Controller/Remote_Control.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ def send_packet(uart_connection_name, packet):
102102
r, g, b = map(scale, cpb.acceleration) # Map acceleration values to RGB values...
103103
color = (r, g, b) # Set color to current mapped RGB value...
104104
print("Color:", color)
105-
cpb.pixels.fill(color) # Fill controller LEDs with current color...
105+
cpb.pixels.fill(color) # Fill Remote Control LEDs with current color...
106106
if not send_packet(uart_connection, ColorPacket(color)): # And send a color packet.
107107
uart_connection = None
108108
continue

0 commit comments

Comments
 (0)