Make color prints optional
@@ -83,11 +83,13 @@ while True:
if isinstance(packet, ColorPacket): # If the packet is color packet...
if mode == 0: # And mode is 0...
animations.color = packet.color # Update the animation to the color.
- print("Color:", packet.color)
+ # Uncomment below to see the color tuple printed to the serial console.
+ # print("Color:", packet.color)
animation_color = packet.color # Keep track of the current color...
elif mode == 1: # Because if mode is 1...
animations.color = animation_color # Freeze the animation color.
- print("Color:", animation_color)
+ # Uncomment below to see the color tuple printed to the serial console.
+ # print("Color:", animation_color)
elif isinstance(packet, ButtonPacket): # If the packet is a button packet...
# Check to see if it's BUTTON_1 (which is being sent by the slide switch)
if packet.button == ButtonPacket.BUTTON_1:
