# Bluefruit Playground App

## Overview

![](https://cdn-learn.adafruit.com/assets/assets/000/085/872/medium800/bluefruit_thumbnail-modules2.jpg?1576471864)

The [Bluefruit Playground](https://apps.apple.com/us/app/bluefruit-playground/id1489549571?ls=1) is an app for **iOS** & **iPadOS.** It allows you to interact with a **Circuit Playground Bluefruit** or **CLUE** board in a variety of different ways, including:

- Control LED color & animation
- View continuous light sensor readings
- View state of built-in buttons & switch
- Turn a CPB into a musical instrument
- View orientation based on accelerometer data
- View temperature readings

The app is designed from the ground up for Circuit Playground Bluefruit & CLUE. You can pick one up from the Adafruit Shop:

Featured
### Circuit Playground Bluefruit - Bluetooth® Low Energy

[Circuit Playground Bluefruit - Bluetooth® Low Energy](https://www.adafruit.com/product/4333)
 **Circuit Playground Bluefruit** is our third board in the Circuit Playground series, another step towards a perfect introduction to electronics and programming. We've taken the popular Circuit Playground Express and made it even better! Now the main chip is an nRF52840...

Out of Stock
[Buy Now](https://www.adafruit.com/product/4333)
[Related Guides to the Product](https://learn.adafruit.com/products/4333/guides)
![shot of a Black woman's neon-green manicured hand holding up a Circuit Playground Bluefruit glowing rainbow LEDs.](https://cdn-shop.adafruit.com/640x480/4333-11.jpg)

Featured
### Adafruit CLUE - nRF52840 Express with Bluetooth® LE

[Adafruit CLUE - nRF52840 Express with Bluetooth® LE](https://www.adafruit.com/product/4500)
Do you feel like you just don't have a CLUE? Well, we can help with that - get a CLUE here at Adafruit by picking up this sensor-packed development board. We wanted to build some projects that have a small screen and a lot of sensors. To make it compatible with existing projects, we made...

Out of Stock
[Buy Now](https://www.adafruit.com/product/4500)
[Related Guides to the Product](https://learn.adafruit.com/products/4500/guides)
![Animated GIF showing CLUE board  displaying data from the many on-board sensors.](https://cdn-shop.adafruit.com/product-videos/640x480/4500-04.jpg)

## Download the app

Before we get started, **download and install** Bluefruit Playground on your iPhone or iPad by following the link below:

[Bluefruit Playground for iOS/iPadOS](https://apps.apple.com/us/app/bluefruit-playground/id1489549571?ls=1)
Info: 

# Bluefruit Playground App

## Standalone Firmware

In order to use the Bluefruit Playground app, you'll need to load **special uf2 firmware** file on your Circuit Playground Bluefruit (aka – **CPB** ) or CLUE. The firmware is simply an Arduino program supplied as a UF2.

Alternatively, you can [use a CircuitPython program](https://learn.adafruit.com/bluefruit-playground-app/circuitpython) that is equivalent to the firmware. There are versions of the&nbsp; CircuitPython program for the CPB, CLUE, and Feather Sense nRF52480, and it's easy to adapt the code to your custom setup with a board that supports CircuitPython with BLE and the sensors you've connected.

If you're just starting out, we recommend this standalone firmware page. More advanced folks who want to see the internals could use the CircuitPython version

## Download uf2 file

**Circuit Playground Bluefruit** users should **click** the button below to **download** the Bluefruit Playground uf2 firmware file and save it to your computer:

[Bluefruit Playground CPB firmware UF2](https://cdn-learn.adafruit.com/assets/assets/000/085/866/original/cplay_ble_v5.ino.uf2?1576459225)
 **CLUE** users should click the link below to download firmware for their device:

[Bluefruit Playground CLUE firmware UF2](https://cdn-learn.adafruit.com/assets/assets/000/089/600/original/CLUE_v10_bluefruit_playground.ino.uf2?1584685625)
(For developers interested in the source code for the firmware and other details, see the [BLE Services](https://learn.adafruit.com/bluefruit-playground-app/ble-services) page in this guide. But you don't need to read or understand that page to use the app.)

## Upload firmware to device

**Connect** your board to your computer via a known good USB data cable (not a "charge-only" cable!).

**Double-click** the **Reset** button near the center of the board. You should see your board's LEDs turn red, then green.

A new drive will appear on your computer with the following name:

- **Circuit Playground Bluefruit** users will see a drive named **CPLAYBTBOOT**
- **CLUE** users will see a drive named **FTHR840BOOT** (or similar)

![](https://cdn-learn.adafruit.com/assets/assets/000/085/865/medium800thumb/bluefruit_drag_uf2.jpg?1576459115)

 **Drag** the Bluefruit Playground **uf2** file onto the drive to copy it to your device.

## Done

Once the uf2 file is finished copying, your device will **reboot** – its NeoPixel LEDs will turn off, and its drive will disappear from your computer.

You're now ready to connect to your device using the Bluefruit Playground app.

# Bluefruit Playground App

## CircuitPython

You can also use the Bluefruit Playground app and the Bluefruit Bluetooth Web Dashboard with CircuitPython. There are CircuitPython programs that do the same thing as the Arduino UF2s listed in this Guide.

This firmware takes more effort to install, so we recommend the Standalone Firmware UF2 for folks who just want to get started!

# Install CircuitPython and Libraries

You'll need to install a version of CircuitPython and a number of libraries specific to your board.

Danger: 

## Install CircuitPython on Circuit Playground Bluefruit

Download the latest version of CircuitPython from the link below. If you need detailed help, follow&nbsp;[these instructions](https://learn.adafruit.com/adafruit-circuit-playground-bluefruit/circuitpython).

![sensors_circuitplayground_bluefruit.jpg](https://cdn-learn.adafruit.com/assets/assets/000/091/146/medium640/sensors_circuitplayground_bluefruit.jpg?1589405418)

[Download CircuitPython for Circuit Playground Bluefruit from circuitpython.org](https://circuitpython.org/board/circuitplayground_bluefruit/)
## Install CircuitPython on CLUE

Download the latest version of CircuitPython for CLUE from the link below. If you need detailed help, follow&nbsp;[these instructions](https://learn.adafruit.com/adafruit-clue/circuitpython).

![sensors_clue_nrf52840_express.jpg](https://cdn-learn.adafruit.com/assets/assets/000/091/145/medium640/sensors_clue_nrf52840_express.jpg?1589405370)

[Download CircuitPython for CLUE from circuitpython.org](https://circuitpython.org/board/clue_nrf52840_express/)
## Install CircuitPython on Feather Bluefruit Sense

Download the latest version of CircuitPython for Feather Bluefruit Sense from the link below. If you need detailed help, follow&nbsp;[these instructions](https://learn.adafruit.com/adafruit-feather-sense/circuitpython-on-feather-sense).

![sensors_feather-bluefruit-sense.jpg](https://cdn-learn.adafruit.com/assets/assets/000/091/162/medium640/sensors_feather-bluefruit-sense.jpg?1589476850)

[Download CircuitPython for Feather Bluefruit Sense](https://circuitpython.org/board/feather_bluefruit_sense/)
# Install Libraries

Now you'll need to get the libraries. First download the library bundle that matches your CircuitPython version from the link below. You'll be download a zip file. Unzip the file, find the **lib** folder, and open it. Then copy the libraries listed for your particular board to the **CIRCUITPY** drive, which will show up when CircuitPython is running.

[Download the CircuitPython Library Bundle from circuitpython.org](https://circuitpython.org/libraries)
## Libraries for Circuit Playground Bluefruit

Copy these folders and files from the **lib** folder in the bundle to the **lib** folder on **CIRCUITPY**. If you need detailed help, follow [these instructions](https://learn.adafruit.com/adafruit-clue/clue-circuitpython-libraries). You may already have many of these libraries if you are already using CircuitPython on the board, but make sure they are up to date, particularly the BLE-related libraries.

- **adafruit\_ble**
- **adafruit\_ble\_adafruit** (you may not have this already)
- **adafruit\_circuitplayground**
- **adafruit\_lis3dh.mpy**
- **adafruit\_thermistor.mpy**
- **neopixel.mpy**

&nbsp;

## Libraries for CLUE and Feather Bluefruit Sense

These boards have the same sensors, so the libraries you need are the same. Copy these folders and files from the&nbsp; **lib** &nbsp;folder in the bundle to the&nbsp; **lib** &nbsp;folder on&nbsp; **CIRCUITPY**. If you need detailed help, follow [these instructions](https://learn.adafruit.com/adafruit-circuit-playground-bluefruit). You may already have many of these libraries if you are already using CircuitPython on the board, but make sure they are up to date, particularly the BLE-related libraries.

- **adafruit\_apds9960**
- **adafruit\_ble**
- **adafruit\_ble\_adafruit&nbsp;** (you may not have this already)
- **adafruit\_bmp280.mpy**
- **adafruit\_bus\_device**
- **adafruit\_clue.mpy**
- **adafruit\_lis3mdl.mpy**
- **adafruit\_lsm6ds.mpy**
- **adafruit\_register**
- **adafruit\_sht31d.mpy**
- **neopixel.mpy**

# Add code.py

Finally, you'll add a **code.py** file that will talk to the Bluefruit Playground app.

## Circuit Playground Bluefruit code.py

Download this file and copy it to **CIRCUITPY** , naming it **code.py.**

https://github.com/adafruit/Adafruit_CircuitPython_BLE_Adafruit/blob/main/examples/ble_adafruit_circuitplayground_bluefruit.py

## CLUE code.py

Download this file and copy it to&nbsp; **CIRCUITPY** , naming it&nbsp; **code.py.**

https://github.com/adafruit/Adafruit_CircuitPython_BLE_Adafruit/blob/main/examples/ble_adafruit_clue.py

## Feather Bluefruit Sense code.py
https://github.com/adafruit/Adafruit_CircuitPython_BLE_Adafruit/blob/main/examples/ble_adafruit_feather_bluefruit_sense.py

# Bluefruit Playground App

## Pairing

Now that you're done uploading the correct firmware, feel free to disconnect your device from your computer and power it via [LiPoly](https://www.adafruit.com/category/574)or [AAA battery pack](https://www.adafruit.com/product/727).

## Scan & connect
![](https://cdn-learn.adafruit.com/assets/assets/000/085/867/medium800/bluefruit_onboarding-circle.png?1576464734)

 **Open** the Bluefruit Playground app on your iPhone or iPad. Read through the startup screens and tap the **Begin Pairing** button at the bottom.

The **Finding CPB** list will appear, showing all the compatible devices detected by the app.

The icon at the left of each device name represents its wireless signal strength (RSSI).

**Tap** the row titled **Bluefruit52** to connect Bluefruit Playground to your CPB.

![bluefruit_Finding_CPB.png](https://cdn-learn.adafruit.com/assets/assets/000/085/869/medium640/bluefruit_Finding_CPB.png?1576465111)

## Don't see your device?
![](https://cdn-learn.adafruit.com/assets/assets/000/085/871/medium800/bluefruit_finding-crop.png?1576465699)

If your CPB doesn't appear on the Finding CPB list:

1. Check to see if the CPB is powered on. Verify that the green **On** light is lit.
2. Make sure CPB is running the correct **firmware**. See the [Firmware page](https://learn.adafruit.com/bluefruit-playground-app/firmware) in this guide.
3. Try resetting the CPB by pressing the small **Reset** button near the center of the board.

# Bluefruit Playground App

## Modules

Once connected, the app will display a list of modules to choose from.

![](https://cdn-learn.adafruit.com/assets/assets/000/085/897/medium800/sensors_module_selection.png?1576611236)

Each module allows you to interact with your CPB in a different way:

- [Neopixels](https://learn.adafruit.com/bluefruit-playground-app/neopixels) – Control LED color & animation
- [Light Sensor](https://learn.adafruit.com/bluefruit-playground-app/light-sensor) – View continuous light sensor readings
- [Button Status](https://learn.adafruit.com/bluefruit-playground-app/button-status) – View live state of built-in buttons & slide switch
- [Tone Generator](https://learn.adafruit.com/bluefruit-playground-app/tone-generator) – Turn a CPB into a musical instrument
- [Accelerometer](https://learn.adafruit.com/bluefruit-playground-app/accelerometer) – View orientation based on accelerometer data
- [Temperature](https://learn.adafruit.com/bluefruit-playground-app/temperature) – View temperature changes over time

Choose one of the modules from the list and go to its related page in this guide to learn more.

# Bluefruit Playground App

## NeoPixels

The Neopixels module allows you to control a CPB's [ten NeoPixel LEDs](https://learn.adafruit.com/adafruit-circuit-playground-bluefruit/guided-tour#step-3039270) together or individually.

![](https://cdn-learn.adafruit.com/assets/assets/000/086/027/medium800thumb/sensors_brew-neopixels1.jpg?1576750445)

## Change Modes
![](https://cdn-learn.adafruit.com/assets/assets/000/085/923/medium800/sensors_neopixels-swipe-400h.png?1576630793)

 **Switch** between three different control **modes** by swiping left/right on the title area of the white panel at the bottom of the screen.

## Light Sequence
The Light Sequence mode lets you play light sequence animations on the CPB NeoPixels.

![](https://cdn-learn.adafruit.com/assets/assets/000/085/946/medium800thumb/sensors_neopixel_light_sequence.jpg?1576658738)

- Play a light sequence by **tapping** one of the four preview animations.
- The sequence playback speed can be changed using the **Speed** slider control at the bottom.

## Neopixel Selection

The **Color Palette** and **Color Wheel** modes allow you to select neopixels individually and in groups.

![](https://cdn-learn.adafruit.com/assets/assets/000/085/948/medium800thumb/sensors_neopixel_selecting.jpg?1576660057)

- **Tap** a NeoPixel in the CPB image to **select** or **deselect** it. Selected NeoPixels are indicated by a surrounding **yellow square**.
- Tap the **O** button on the left to **select** all NeoPixels. Tap the **X** button to **deselect** all NeoPixels.
- Tap the **trash** can icon to turn all NeoPixels **off**.

## Color Palette&nbsp;
The Color Palette mode provides a variety of presets to use for setting NeoPixel color.

![](https://cdn-learn.adafruit.com/assets/assets/000/085/921/medium800/sensors_neopixel_colorpalette-400h.png?1576630674)

- Tap one of the colors to change the color of all selected NeoPixels.
- Use the slider at the bottom to set the **Brightness** of colors sent to the CPB.

## Color Wheel
Color Wheel mode lets you pick a color from a continuous color field.

![](https://cdn-learn.adafruit.com/assets/assets/000/085/920/medium800/sensors_neopixel_colorwheel-400h.png?1576630477)

- **Touch** the selection ring in the color field to **send** the currently selected color.
- **Drag** the selection ring across the color field to select and send a new color.
- The chosen color will be displayed in the square to the right along with its **hexadecimal** representation below.
- The slider at the bottom allows you to set the **Brightness** of colors sent to the CPB.

# Bluefruit Playground App

## Light Sensor

The Light Sensor module allows you to view the amount of light detected by the CPB built-in [ALS-PT19 light sensor](https://learn.adafruit.com/adafruit-circuit-playground-bluefruit/guided-tour#step-3039275).

![](https://cdn-learn.adafruit.com/assets/assets/000/086/024/medium800thumb/sensors_light-split-demo-brew3.jpg?1576751298)

## Luminance Reading

The current light level is displayed as a numeric value on the **Luminance Reading** panel at the bottom of the screen. New values are sent from the CPB **ten times per second**.

![](https://cdn-learn.adafruit.com/assets/assets/000/085/925/medium800thumb/sensors_light_level_meter.jpg?1576633319)

Try shining a flashlight on the CPB to see the values change in realtime.

# Bluefruit Playground App

## Button Status

The Button Status module displays the activity of a CPB's two built-in momentary [pushbuttons](https://learn.adafruit.com/adafruit-circuit-playground-bluefruit/guided-tour#step-3039281) and [slide switch](https://learn.adafruit.com/adafruit-circuit-playground-bluefruit/guided-tour#step-3039283).

![](https://cdn-learn.adafruit.com/assets/assets/000/086/026/medium800thumb/sensors_buttons-split-demo-brew3.jpg?1576751759)

- When a **button** on the CPB is pressed, it's corresponding **letter**  **icon** in the bottom panel will turn orange.
- When the CPB's **slide**  **switch** is activated, it's corresponding **arrow icon** in the bottom panel will turn orange.
- The current **position** of the CPB's slide switch is indicated by the **direction** of the arrow icon.

# Bluefruit Playground App

## Tone Generator

The Tone Generator module allows you to use a Circuit Playground Bluefruit as a simple **monophonic**  **synthesizer**.

![](https://cdn-learn.adafruit.com/assets/assets/000/086/028/medium800thumb/sensors_tone.jpg?1576749973)

- **Press a key** on the piano keyboard at the bottom to play a corresponding note on the CPB's built-in speaker.
- Try pressing keys in sequence to perform a song.

## Frequency values

The Tone Generator's keyboard can play notes **C**** 4 **through** G5**. Below, you can see the frequency values for each of the included notes.

| **Note** | **Frequency(Hz)** | **Wavelength(cm)** |
| C<sub>4</sub> | 261.63 | 131.87 |
| &nbsp;C<sup>#</sup><sub>4</sub>/D<sup>b</sup><sub>4</sub>&nbsp; | 277.18 | 124.47 |
| D<sub>4</sub> | 293.66 | 117.48 |
| &nbsp;D<sup>#</sup><sub>4</sub>/E<sup>b</sup><sub>4</sub>&nbsp; | 311.13 | 110.89 |
| E<sub>4</sub> | 329.63 | 104.66 |
| F<sub>4</sub> | 349.23 | 98.79 |
| &nbsp;F<sup>#</sup><sub>4</sub>/G<sup>b</sup><sub>4</sub>&nbsp; | 369.99 | 93.24 |
| G<sub>4</sub> | 392.00 | 88.01 |
| &nbsp;G<sup>#</sup><sub>4</sub>/A<sup>b</sup><sub>4</sub>&nbsp; | 415.30 | 83.07 |
| A<sub>4</sub> | 440.00 | 78.41 |
| &nbsp;A<sup>#</sup><sub>4</sub>/B<sup>b</sup><sub>4</sub>&nbsp; | 466.16 | 74.01 |
| B<sub>4</sub> | 493.88 | 69.85 |
| C<sub>5</sub> | 523.25 | 65.93 |
| &nbsp;C<sup>#</sup><sub>5</sub>/D<sup>b</sup><sub>5</sub>&nbsp; | 554.37 | 62.23 |
| D<sub>5</sub> | 587.33 | 58.74 |
| &nbsp;D<sup>#</sup><sub>5</sub>/E<sup>b</sup><sub>5</sub>&nbsp; | 622.25 | 55.44 |
| E<sub>5</sub> | 659.25 | 52.33 |
| F<sub>5</sub> | 698.46 | 49.39 |
| &nbsp;F<sup>#</sup><sub>5</sub>/G<sup>b</sup><sub>5</sub>&nbsp; | 739.99 | 46.62 |
| G<sub>5</sub> | 783.99 | 44.01 |

# Bluefruit Playground App

## Accelerometer

The Accelerometer module uses readings from the Circuit Playground Bluefruit [LIS3DH 3-axis XYZ accelerometer](https://learn.adafruit.com/adafruit-circuit-playground-bluefruit/guided-tour#step-3039278) to determine the board orientation.

![](https://cdn-learn.adafruit.com/assets/assets/000/086/025/medium800thumb/sensors_accel-split-demo-brew3.jpg?1576752171)

The accelerometer values sent from the CPB are used to calculate **orientation** , measured in **Euler angles**. This orientation is then used to set the rotation of the 3D model in the main view.

- Individual values are displayed in the white panel at the bottom of the screen. 
- Accelerometer X, Y, & Z values are displayed in **meters per second squared**.
- Euler Angle X, Y, & Z values are displayed in **degrees**.

Info: 

## Offset Controls

The CPB 3D model can be **rotated manually** to set a rotation offset.

![](https://cdn-learn.adafruit.com/assets/assets/000/086/031/medium800thumb/sensors_accel_offset.jpg?1576755040)

- Tap and drag across the 3D model to **rotate** it manually.
- Double-tap the 3D model to **reset** its orientation.

# Bluefruit Playground App

## Temperature

The Temperature module displays continuous temperature readings from Circuit Playground Bluefruit’s built-in [thermistor](https://learn.adafruit.com/adafruit-circuit-playground-bluefruit/guided-tour#step-3039276).

![](https://cdn-learn.adafruit.com/assets/assets/000/086/029/medium800thumb/sensors_temp.jpg?1576752039)

- The current temperature reading is displayed in the center of the screen.&nbsp;
- Switch between **Fahrenheit** and **Celsius** units by tapping the **°F** / **°C** button on the right side.

## Temperature Graph

Temperature values are sent from the CPB **twice per second**. Previous values are recorded and displayed in the graph in the bottom panel.

![](https://cdn-learn.adafruit.com/assets/assets/000/085/931/medium800thumb/sensors_temp_panel2.jpg?1576636109)

Try breathing **hot air** on CPB to warm it up quickly – then place it in the refrigerator to cool it down.

# Bluefruit Playground App

## BLE Services

This page is intended for **developers** who are interested in communicating with a Circuit Playground Bluefruit from their own custom Bluetooth LE application. The source code for the [firmware](https://learn.adafruit.com/bluefruit-playground-app/firmware) is available at this link:

[Latest Circuit Playground Bluefruit firmware source code (Arduino sketch)](https://github.com/adafruit/Adafruit_nRF52_Arduino/blob/master/libraries/Bluefruit52Lib/examples/Peripheral/bluefruit_playground/bluefruit_playground.ino)
All of the BLE services used by CPB's Bluefruit Playground&nbsp;[firmware](https://learn.adafruit.com/bluefruit-playground-app/firmware)&nbsp;are documented below.

All Adafruit Service/Characteristic UUID128 share the same Base UUID :

- `ADAFxxxx-C332-42A8-93BD-25E905756CB8`

Each service's UUID can be found by replacing `xxxx` with the service four-digit hex number.

### 

A device will advertise as a **connectable** type using the manufacturer specific data flag with Adafruit Company ID of **0x0822** as follows:&nbsp;

| 1 byte &nbsp; &nbsp; | 1 byte |&nbsp; 2 bytes | 1 byte &nbsp; | 2 bytes | variable

-------------------------------------------------------------------------------------

**| total len | Mfr Tag | 0x0822 | field len | field key | field value**

There could be several of field (len, key, value) as long as they are all fitted into an advertising packet (31 byte for normal advertising, 200 bytes for extended advertising).

- Total len : 1 + 2 + sum( **field\_len +** 1)
- Field len : 2 + len( **field\_value** )
- Field key is enumeration constant

  - **0x0000** :&nbsp; Color ID, followed by 3 bytes of RGB for current color displayed on the board. Helpful to quickly know which board we are about to connect to.
  - **0x0001** : Board ID, followed by 2 bytes of USB PID of board. Can be used as a filter and display the board image on a mobile application

    - 0x8029: Feather nRF52840 Express (Arduino mode)
    - 0x802A: Feather nRF52840 Express (CircuitPython mode)
    - 0x8045: CPlayground Bluefruit (Arduino mode)
    - 0x8046: CPlayground Bluefruit (CircuitPython mode)
    - 0xEA60: Adafruit nRF52832 Feather (Arduino mode only)

### 

 **Measurement Period** : 0001

- { int32: period }

  - Read + Write
  - period = 1 to 2^31-1: Milliseconds between measurements
  - period = -1: Stop measuring
  - period = 0: Update the measurement whenever it changes, as often as possible

**Service Version** : 0002

- { uint32: version }

  - Read

- If characteristic is not present, version =&nbsp; 1 (v1)

### 

 **Temperature Service** : 0100

- **Temperature** : 0101

  - { float32: temperature }

    - Read + Notify
    - temperature in degrees Celsius

- **Measurement Period** : 0001
- **Service Version** : 0002 (optional): v1

### 

 **Accelerometer Service** : 0200

- **Acceleration** : 0201

  - ( float32: x, float32: y, float32: z }

    - Read + Notify
    - x, y, z acceleration values, in m/s^2

- **Measurement Period** : 0001
- **Service Version** : 0002 (optional): v1

### 

 **Light Sensor Service** : 0300

- **Light Level** : 0301

  - { level: float32 }

    - Read + Notify

- **Measurement Period** : 0001
- **Service Version** : 0002 (optional)

### 

 **Board Button Service** : 0600

- **Pressed** : 0601

  - {state: uint32}

    - Read + Notify
    - bit 0: slide switch: 1 for left, 0 for right
    - bit 1: 1 = button A pressed
    - bit 2: 1 = button B pressed
    - Other bits available for future buttons

- **Measurement Period** : 0001
- **Service Version** : 0002 (optional): v1

### 

 **Tone Service** : 0C00

- **Tone** : 0C01

  - { frequency: uint16, duration: uint32 }

    - Write
    - frequency: Hz, 0 for **no tone** (useful to turn off a non-stop tone)
    - duration: milliseconds, 0 for **non-stop**

### 

 **Addressable Pixel Service** : 0900

- General service for any kind of addressable pixels, including WS2812 (NeoPixel), WS2801, APA102 (DotStar), etc. It is the client’s responsibility to know the number of colors, color order, etc. and to fill the buffer appropriately. The server is only concerned with the electrical protocol.
- **Pixel Pin** : 0901

  - { pin: uint8 }

    - Read + Write
    - pin: Send data out on this pin.

- **Pixel Pin Type** : 0902

  - { type: uint8 }

    - Read + Write
    - 0 = WS2812 (NeoPixel), 800 kHz
    - 1 = SPI (APA102: DotStar)
    - [more protocols later]

- **Pixel Data** : 0903

  - { start: uint16,&nbsp; flags: uint8; data: uint8[up to 509] }

    - variable length
    - Write
    - index: start writing data into buffer at this byte number (byte, not pixel)
    - flags:

      - bit 0: 0 = don’t write to pixels yet
      - 1 = write entire buffer to pixels now

    - data: raw array of data for all pixels, in proper color order for type of pixel

- **Pixel Buffer Size** : 0904

  - { length: uint16 }

    - Read + Write
    - Size of buffer, in bytes, needed to hold data for entire pixel string


## Guide Products

### Circuit Playground Bluefruit - Bluetooth® Low Energy

[Circuit Playground Bluefruit - Bluetooth® Low Energy](https://www.adafruit.com/product/4333)
 **Circuit Playground Bluefruit** is our third board in the Circuit Playground series, another step towards a perfect introduction to electronics and programming. We've taken the popular Circuit Playground Express and made it even better! Now the main chip is an nRF52840...

Out of Stock
[Buy Now](https://www.adafruit.com/product/4333)
[Related Guides to the Product](https://learn.adafruit.com/products/4333/guides)
### Adafruit CLUE - nRF52840 Express with Bluetooth® LE

[Adafruit CLUE - nRF52840 Express with Bluetooth® LE](https://www.adafruit.com/product/4500)
Do you feel like you just don't have a CLUE? Well, we can help with that - get a CLUE here at Adafruit by picking up this sensor-packed development board. We wanted to build some projects that have a small screen and a lot of sensors. To make it compatible with existing projects, we made...

Out of Stock
[Buy Now](https://www.adafruit.com/product/4500)
[Related Guides to the Product](https://learn.adafruit.com/products/4500/guides)

## Related Guides

- [Adafruit Circuit Playground Bluefruit](https://learn.adafruit.com/adafruit-circuit-playground-bluefruit.md)
- [Introducing Adafruit CLUE](https://learn.adafruit.com/adafruit-clue.md)
- [MX MIDI Guitar](https://learn.adafruit.com/mx-midi-guitar.md)
- [Schluff - The Sleep Monitor](https://learn.adafruit.com/schluff-the-oshw-sleep-monitor.md)
- [Digital Nose Milk Freshness Checker](https://learn.adafruit.com/digital-nose-gas-sensor-milk-freshness-checker.md)
- [Making a PyPortal User Interface with DisplayIO](https://learn.adafruit.com/making-a-pyportal-user-interface-displayio.md)
- [LED Acrylic Sign](https://learn.adafruit.com/led-acrylic-sign.md)
- [Circuit Playground Express: Piano de Limones](https://learn.adafruit.com/circuit-playground-express-piano-de-limones.md)
- [DotStar Belly Dance Fans](https://learn.adafruit.com/dotstar-belly-dance-fans.md)
- [PyLeap CLUE Barometer](https://learn.adafruit.com/pyleap-clue-barometer.md)
- [Using the Slamtec RPLIDAR on a Raspberry Pi](https://learn.adafruit.com/slamtec-rplidar-on-pi.md)
- [Tappy Robotic Hand](https://learn.adafruit.com/robotic-tapping-hand-with-cpx.md)
- [NeoPixel Badge Lanyard with Bluetooth LE](https://learn.adafruit.com/bluetooth-neopixel-badge-lanyard.md)
- [Princess Peach LED Crown](https://learn.adafruit.com/bowsette.md)
- [Boomy The Boombox](https://learn.adafruit.com/boomy-the-boombox.md)
- [Walkmp3rson: Personal MP3 'Tape' Player](https://learn.adafruit.com/walkmp3rson-personal-mp3-tape-player.md)
- [Green Goblin Pumpkin CPB Ornament](https://learn.adafruit.com/green-goblin-pumpkin-cpb-ornament.md)
