You can use your Circuit Playground Bluefruit with the Adafruit Bluefruit LE Connect mobile app to control the NeoPixel RGB LEDs on the CPB!
Installing Project Code
To use with CircuitPython, you need to first install a few libraries, into the lib folder on your CIRCUITPY drive. Then you need to update code.py with the example script.
Thankfully, we can do this in one go. In the example below, click the Download Project Bundle button below to download the necessary libraries and the code.py file in a zip file. Extract the contents of the zip file, open the directory examples/ and then click on the directory that matches the version of CircuitPython you're using and copy the contents of that directory to your CIRCUITPY drive.
Your CIRCUITPY drive should now look similar to the following image:

# SPDX-FileCopyrightText: 2020 ladyada for Adafruit Industries # SPDX-License-Identifier: MIT # CircuitPython NeoPixel Color Picker Example import board import neopixel from adafruit_bluefruit_connect.packet import Packet from adafruit_bluefruit_connect.color_packet import ColorPacket from adafruit_ble import BLERadio from adafruit_ble.advertising.standard import ProvideServicesAdvertisement from adafruit_ble.services.nordic import UARTService ble = BLERadio() uart_service = UARTService() advertisement = ProvideServicesAdvertisement(uart_service) pixels = neopixel.NeoPixel(board.NEOPIXEL, 10, brightness=0.1) while True: # Advertise when not connected. ble.start_advertising(advertisement) while not ble.connected: pass ble.stop_advertising() while ble.connected: if uart_service.in_waiting: packet = Packet.from_stream(uart_service) if isinstance(packet, ColorPacket): print(packet.color) pixels.fill(packet.color)
Connect to your board through the Adafruit Bluefruit LE Connect mobile app. If you need assistance, check out this page on installing and using the app.
Once connected, from the device menu, tap on Controller, then Color Picker. Choose a color from the dial and tap Select (Android) or Send selected color (iOS). The LEDs will light up in the color you chose!
Page last edited January 22, 2025
Text editor powered by tinymce.