# cpb_hello_world.py

# "Hello, world" test for the Adafruit Circuit Playground Bluefruit board.
# This program uses only onboard hardware: NeoPixel LEDs.
# The text output can be seen on the serial console.

# Import the standard Python time functions.
import time

# Import the board-specific input/output library.
from adafruit_circuitplayground import cp

# Print a message to the serial console.
print("Hello, world.")

# Initialize global variables for the main loop.
led_index = 0

# Enter the main event loop to animate the NeoPixel LEDs by lighting them up
# in sequence.
while True:
    cp.pixels[led_index] = (0,0,0)
    led_index = (led_index + 1) % 10
    cp.pixels[led_index] = (0,0,255)
    time.sleep(0.2)
