# Wirelessly Program a Circuit Playground Bluefruit Using the File Glider App 

## Overview

![](https://cdn-learn.adafruit.com/assets/assets/000/108/647/medium800/led_pixels_Screen_Shot_2022-02-04_at_5.04.01_PM.png?1644012263)

![](https://cdn-learn.adafruit.com/assets/assets/000/108/649/medium800/led_pixels_Screen_Shot_2022-02-04_at_5.06.02_PM.png?1644012387)

Now you can code without cables! In this guide, you’ll be able to use any iOS device, such as an iPhone or an iPad, to easily transfer files to a [Circuit Playground Bluefruit](https://learn.adafruit.com/adafruit-circuit-playground-bluefruit) (CPB). This is made possible by the new [File Glider Application for iOS](https://apps.apple.com/us/app/file-glider/id1583976527). This app allows you to connect to a CPB from your iOS device then you can transfer files to the CPB through the [Files](https://support.apple.com/en-us/HT206481) app. Once connected, you’ll also be able to create, move, rename and delete files and directories through the Files app. Additionally, the File Glider app enables you to write and edit code directly to the CPB!

This will be demonstrated using an example Rainbow Touch program where the colors of the NeoPixel LEDs on the CPB can be changed with the touch of any I/O pin.

Info: 

Warning: 

## Parts
### 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)

### USB cable - USB A to Micro-B

[USB cable - USB A to Micro-B](https://www.adafruit.com/product/592)
This here is your standard A to micro-B USB cable, for USB 1.1 or 2.0. Perfect for connecting a PC to your Metro, Feather, Raspberry Pi or other dev-board or microcontroller

Approximately 3 feet / 1 meter long

Out of Stock
[Buy Now](https://www.adafruit.com/product/592)
[Related Guides to the Product](https://learn.adafruit.com/products/592/guides)
![USB cable - USB A to Micro-B - 3 foot long](https://cdn-shop.adafruit.com/640x480/592-01.jpg)

To power the CPB SEPARATELY from your computer (more on this later), you have a choice of:

### Lithium Ion Polymer Battery with Short Cable - 3.7V 420mAh

[Lithium Ion Polymer Battery with Short Cable - 3.7V 420mAh](https://www.adafruit.com/product/4236)
Lithium-ion polymer (also known as 'lipo' or 'lipoly') batteries are thin, light, and powerful. The output ranges from 4.2V when completely charged to 3.7V. This battery has a capacity of 420mAh for a total of about 1.55 Wh. If you need a larger (or smaller!) battery, <a...></a...>

In Stock
[Buy Now](https://www.adafruit.com/product/4236)
[Related Guides to the Product](https://learn.adafruit.com/products/4236/guides)
![Lithium Ion Polymer Battery 3.7v 420mAh with JST 2-PH connector and short cable](https://cdn-shop.adafruit.com/640x480/4236-04.jpg)

OR

### 5V 2.5A Switching Power Supply with 20AWG MicroUSB Cable

[5V 2.5A Switching Power Supply with 20AWG MicroUSB Cable](https://www.adafruit.com/product/1995)
Our all-in-one 5V 2.5 Amp + MicroUSB cable power adapter is the perfect choice for powering single-board computers like Raspberry Pi, BeagleBone, or anything else that's power-hungry!

This adapter was specifically designed to provide 5.25V, not 5V, but we still call it a 5V USB...

In Stock
[Buy Now](https://www.adafruit.com/product/1995)
[Related Guides to the Product](https://learn.adafruit.com/products/1995/guides)
![MicroUSB power supply with bundled cable and U.S. plugs.](https://cdn-shop.adafruit.com/640x480/1995-02.jpg)

Alternatively, you can use the USB cable from your computer and plug it into this adapter to power the CPB without plugging into a computer:

### 5V 2A Switching Power Supply w/ USB-A Connector

[5V 2A Switching Power Supply w/ USB-A Connector](https://www.adafruit.com/product/1994)
Our 5V 2A USB power adapter is the perfect choice for powering single-board computers like Raspberry Pi, BeagleBone, or anything else that's power-hungry!

This adapter was specifically designed to provide 5.25V, not 5V, but we still call it a 5V USB adapter. We did this on purpose to...

In Stock
[Buy Now](https://www.adafruit.com/product/1994)
[Related Guides to the Product](https://learn.adafruit.com/products/1994/guides)
![5V 2A Switching Power Supply with  USB-A Connector](https://cdn-shop.adafruit.com/640x480/1994-01.jpg)

# Wirelessly Program a Circuit Playground Bluefruit Using the File Glider App 

## CircuitPython

[CircuitPython](CircuitPython%20is%20a%20programming%20language%20designed%20to%20simplify%20experimenting%20and%20learning%20to%20program%20on%20low-cost%20microcontroller%20boards.) is a programming language designed to simplify experimenting and learning to program on low-cost microcontroller boards.

Currently, the File Glider App **requires** a Circuit Playground Bluefruit board running the most recent build of CircuitPython 7. If you&nbsp;haven't already, you'll need to download the&nbsp; **latest** version of CircuitPython from the link below. [For more on CircuitPython, check out this guide.](https://learn.adafruit.com/adafruit-circuit-playground-bluefruit/what-is-circuitpython)

[Download CircuitPython for Circuit Playground Bluefruit from CircuitPython.org](https://circuitpython.org/board/circuitplayground_bluefruit/)
Plug your Circuit Playground Bluefruit into your computer using a known-good data-capable USB cable.

**A lot of people end up using charge-only USB cables and it is very frustrating! So make sure you have a USB cable you know is good for data sync.**

![led_pixels_Screen_Shot_2022-02-02_at_3.06.06_PM.png](https://cdn-learn.adafruit.com/assets/assets/000/108/576/medium640/led_pixels_Screen_Shot_2022-02-02_at_3.06.06_PM.png?1643832423)

Double-click the small&nbsp; **Reset&nbsp;** button in the middle of the CPB (indicated by the red arrow in the image). The ten NeoPixel LEDs will all turn red, and then will all turn green. If they turn all red and stay red, check the USB cable, try another USB port, etc. The little red LED next to the USB connector will pulse red - this is ok!

If double-clicking doesn't work the first time, try again. Sometimes it can take a few tries to get the rhythm right!

(If double-clicking doesn't do it, try a single-click!)

![led_pixels_image.png](https://cdn-learn.adafruit.com/assets/assets/000/108/575/medium640/led_pixels_image.png?1643832378)

You will see a new disk drive appear called&nbsp; **CPLAYBTBOOT**.

Drag the&nbsp; **adafruit\_circuitpython\_etc.uf2** file to&nbsp; **CPLAYBTBOOT.**

The LEDs will turn red. Then, the&nbsp; **CPLAYBTBOOT** &nbsp;drive will disappear and a new disk drive called&nbsp; **CIRCUITPY** &nbsp;will appear.

That's it, you're done! :)

![led_pixels_Screen_Shot_2022-02-02_at_3.14.00_PM.png](https://cdn-learn.adafruit.com/assets/assets/000/108/577/medium640/led_pixels_Screen_Shot_2022-02-02_at_3.14.00_PM.png?1643832918)

# Wirelessly Program a Circuit Playground Bluefruit Using the File Glider App 

## File Glider App Set Up

![](https://cdn-learn.adafruit.com/assets/assets/000/108/578/medium800/led_pixels_Screen_Shot_2022-02-02_at_3.21.41_PM.png?1643833326)

## What is File Glider?
From the description in the App store, File Glider allows you to:

> Wirelessly transfer files to and from file transfer-ready Bluetooth Low Energy (BLE) firmware. You can browse and edit files from within File Glider or use the Files app integration to access the files from other apps. Multiple devices can be managed at once and access can be shared amongst multiple apps.

Basically, this app allows you to transfer files from your iOS device to your CPB wirelessly with a couple of taps. It also lets you add and edit code on the CPB directly from the App, how neat!

## Step 1: [Download the File Glider App](https://apps.apple.com/us/app/file-glider/id1583976527) from the App Store.

Using your iOS device, download the File Glider App.

Info: 

## Step 2: Connect your BLE board to your iOS device through the app.

Open the File Glider App after it finishes downloading and make sure your board is connected to your computer.

![](https://cdn-learn.adafruit.com/assets/assets/000/108/579/medium800thumb/led_pixels_click_gif.jpg?1643834101)

- Click the reset button on the board.
- You will see the board NeoPixels flash through a series of colors, first red, then yellow then blue.
- When the blue appears, click the reset button again.
- The NeoPixels will then flash through another series of colors then turn blue momentarily before turning off again.

![](https://cdn-learn.adafruit.com/assets/assets/000/108/722/medium800/led_pixels_Untitled4.png?1644240906)

- The app should then state "Status: connected..."&nbsp;
- Then a Bluetooth Pairing Request will pop up, select "Pair".
- The board is now connected to the File Glider App!

![led_pixels_IMG_1231.jpg](https://cdn-learn.adafruit.com/assets/assets/000/108/601/medium640/led_pixels_IMG_1231.jpg?1643998855)

![led_pixels_IMG_1232.jpg](https://cdn-learn.adafruit.com/assets/assets/000/108/602/medium640/led_pixels_IMG_1232.jpg?1643998879)

![](https://cdn-learn.adafruit.com/assets/assets/000/108/723/medium800/led_pixels_Untitled4.png?1644240952)

## Troubleshooting

**Problem:** You try to connect your board but then you see the following error on the app "Disconnected: Peer removed pairing information"

 **Solution:&nbsp;** Go to your Bluetooth device settings on your iOS device (Settings \> Bluetooth). Scroll down to the one labeled "CIRCUITPYxxxx". Then click on the info icon (a letter i with a circle). Now select "forget this device". Try to connect the board again from step 2 above and you should be set.

![led_pixels_IMG_1235.jpg](https://cdn-learn.adafruit.com/assets/assets/000/108/606/medium640/led_pixels_IMG_1235.jpg?1643999680)

![led_pixels_IMG_1236.jpg](https://cdn-learn.adafruit.com/assets/assets/000/108/607/medium640/led_pixels_IMG_1236.jpg?1643999706)

# Wirelessly Program a Circuit Playground Bluefruit Using the File Glider App 

## Code the CPB

![](https://cdn-learn.adafruit.com/assets/assets/000/108/660/medium800/led_pixels_image.png?1644013113)

To demonstrate how to download and transfer code to the CPB via the File Glider and Files apps, I will use the code from the [NeoPixel Rainbow Touch PyLeap project](https://learn.adafruit.com/pyleap-touch-neopixel-rainbow). This code allows you to change the colors of the NeoPixels on the CPB by touching the various input-output (IO) pads.

## Step 1: Unplug your CPB from your computer and power it from a battery or a wall outlet.

The files will not be able to transfer to the CPB while it is connected to your computer. You must power it separately from a battery or 5V power source from the wall. If the CPB is connected over USB then that prevents writing files over BLE. Otherwise, you risk corrupting the file system.

Info: 

## Step 2: Download the Code to the Files app on your iOS device
Open this guide on your iOS device in Chrome, Safari or your browser of choice. Click the "download project bundle" from the code below. When prompted, click "download".

https://github.com/adafruit/Adafruit_Learning_System_Guides/blob/main/PyLeap/PyLeap_Bluefruit_Touch_NeoPixel_Rainbow/code.py

- Now click "open in..." and you will be prompted with some options on where to save the files.
- Choose "Save to Files" from the list provided. Select the folder "On My iPhone/iPad".
- I made a folder in the "on My iPhone" folder called "Adafruit" and saved it there.
- If you would like to make a new folder, you can click the folder + icon on the top right of the screen.

&nbsp;

![led_pixels_IMG_1239.jpg](https://cdn-learn.adafruit.com/assets/assets/000/108/608/medium640/led_pixels_IMG_1239.jpg?1643999813)

![led_pixels_IMG_1241.jpg](https://cdn-learn.adafruit.com/assets/assets/000/108/609/medium640/led_pixels_IMG_1241.jpg?1643999833)

![led_pixels_IMG_1271.jpg](https://cdn-learn.adafruit.com/assets/assets/000/108/610/medium640/led_pixels_IMG_1271.jpg?1644000366)

![led_pixels_IMG_1271_edit.jpg](https://cdn-learn.adafruit.com/assets/assets/000/108/611/medium640/led_pixels_IMG_1271_edit.jpg?1644000563)

## Step 3: Transfer Files from Files App to File Glider

Head to your Files app on your iOS device. To find the Files app, search your iOS device for "Files" and you should see an app with an icon of a blue folder pop up.

- Select the folder "On My iPhone/iPad". Then navigate to where you saved the code files.
- Next, click the .zip file and a folder called **PyLeap\_Bluefruit\_Touch\_NeoPixel\_Rainbow** &nbsp;should appear.
- Click on the folder and then select the folder entitled **CircuitPython7.x**.
- You will now see a **code.py** file and a **lib** folder. These are the files you will transfer to the CPB via the File Glider App.

![led_pixels_IMG_1242.jpg](https://cdn-learn.adafruit.com/assets/assets/000/108/614/medium640/led_pixels_IMG_1242.jpg?1644002057)

![led_pixels_IMG_1243.jpg](https://cdn-learn.adafruit.com/assets/assets/000/108/619/medium640/led_pixels_IMG_1243.jpg?1644002093)

![led_pixels_IMG_1244.jpg](https://cdn-learn.adafruit.com/assets/assets/000/108/620/medium640/led_pixels_IMG_1244.jpg?1644002112)

First, press and hold onto the **code.py** file for a couple of seconds and you will see a list of options appear.&nbsp;

![](https://cdn-learn.adafruit.com/assets/assets/000/108/724/medium800/led_pixels_Untitled4.png?1644241236)

- Select the "move" option and choose the **CIRCUITPYxxxx** folder within File Glider as the destination.
- Then click "copy".
- Do the same with the **lib** folder.

![led_pixels_IMG_1246.jpg](https://cdn-learn.adafruit.com/assets/assets/000/108/624/medium640/led_pixels_IMG_1246.jpg?1644002351)

Congrats you have just successfully programmed the CPB!

# Wirelessly Program a Circuit Playground Bluefruit Using the File Glider App 

## Play!

![](https://cdn-learn.adafruit.com/assets/assets/000/108/625/medium800thumb/led_pixels_cover_gif.jpg?1644002697)

The Rainbow Touch sketch should be running on your CPB now, so test it out! You can tap various pads on the CPB with your finger and this will change the color of the NeoPixels.

## Going Further with File Glider: Code on your Phone!

If you so wish, you can now edit and adapt the code on your CPB through the File Glider app directly from your iOS device.

- Open the File Glider App and make sure you are connected to your CPB. You should see **CIRCUITPYxxxx** listed under "Connected Peripherals:"
- At the bottom of the app, tap "Explorer". Now you will see all the files and code on your CPB.
- Tap on the **code.py** file. Now tap anywhere in the code and a keyboard should pop up.
- Add or edit any code and hit "save" above the keyboard.
- The code will be updated on your CPB!

![](https://cdn-learn.adafruit.com/assets/assets/000/108/725/medium800/led_pixels_Untitled4.png?1644241348)

Have fun coding away on your iOS device without any cluncky cables :)


## Featured 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)
### USB cable - USB A to Micro-B

[USB cable - USB A to Micro-B](https://www.adafruit.com/product/592)
This here is your standard A to micro-B USB cable, for USB 1.1 or 2.0. Perfect for connecting a PC to your Metro, Feather, Raspberry Pi or other dev-board or microcontroller

Approximately 3 feet / 1 meter long

Out of Stock
[Buy Now](https://www.adafruit.com/product/592)
[Related Guides to the Product](https://learn.adafruit.com/products/592/guides)
### Lithium Ion Polymer Battery with Short Cable - 3.7V 420mAh

[Lithium Ion Polymer Battery with Short Cable - 3.7V 420mAh](https://www.adafruit.com/product/4236)
Lithium-ion polymer (also known as 'lipo' or 'lipoly') batteries are thin, light, and powerful. The output ranges from 4.2V when completely charged to 3.7V. This battery has a capacity of 420mAh for a total of about 1.55 Wh. If you need a larger (or smaller!) battery, <a...></a...>

In Stock
[Buy Now](https://www.adafruit.com/product/4236)
[Related Guides to the Product](https://learn.adafruit.com/products/4236/guides)
### 5V 2.5A Switching Power Supply with 20AWG MicroUSB Cable

[5V 2.5A Switching Power Supply with 20AWG MicroUSB Cable](https://www.adafruit.com/product/1995)
Our all-in-one 5V 2.5 Amp + MicroUSB cable power adapter is the perfect choice for powering single-board computers like Raspberry Pi, BeagleBone, or anything else that's power-hungry!

This adapter was specifically designed to provide 5.25V, not 5V, but we still call it a 5V USB...

In Stock
[Buy Now](https://www.adafruit.com/product/1995)
[Related Guides to the Product](https://learn.adafruit.com/products/1995/guides)
### 5V 2A Switching Power Supply w/ USB-A Connector

[5V 2A Switching Power Supply w/ USB-A Connector](https://www.adafruit.com/product/1994)
Our 5V 2A USB power adapter is the perfect choice for powering single-board computers like Raspberry Pi, BeagleBone, or anything else that's power-hungry!

This adapter was specifically designed to provide 5.25V, not 5V, but we still call it a 5V USB adapter. We did this on purpose to...

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

## Related Guides

- [Adafruit Circuit Playground Bluefruit](https://learn.adafruit.com/adafruit-circuit-playground-bluefruit.md)
- [Circuit Playground TFT Gizmo Dreidel](https://learn.adafruit.com/circuit-playground-tft-gizmo-dreidel.md)
- [Easy No-Soldering Bluetooth Controlled Room Lights](https://learn.adafruit.com/easy-no-solder-bluetooth-controlled-room-lights.md)
- [Wireless Image Transfer with Circuit Playground Bluefruit and E-Ink Gizmo](https://learn.adafruit.com/wireless-image-transfer-with-circuit-playground-bluetooth-and-eink-gizmo.md)
- [CircuitPython Made Easy on Circuit Playground Express and Bluefruit](https://learn.adafruit.com/circuitpython-made-easy-on-circuit-playground-express.md)
- [Snow Globe with Circuit Playground Bluefruit](https://learn.adafruit.com/snow-globe-bluefruit-cpb.md)
- [Bluefruit TFT Gizmo ANCS Notifier for iOS](https://learn.adafruit.com/ancs-gizmo.md)
- [¡Bienvenido a CircuitPython!](https://learn.adafruit.com/bienvenido-a-circuitpython-2.md)
- [Circuit Playground Bluefruit Quick Draw Duo](https://learn.adafruit.com/circuit-playground-bluefruit-quick-draw-duo.md)
- [Sound Reactive Rapunzel Hair](https://learn.adafruit.com/sound-reactive-rapunzel-hair.md)
- [PyLeap device enabled - In Rainbows](https://learn.adafruit.com/pyleap-device-enabled-in-rainbows.md)
- [Stained Glass Lamp](https://learn.adafruit.com/stained-glass-lamp.md)
- [Turtle Graphics in CircuitPython on TFT Gizmo](https://learn.adafruit.com/turtle-graphics-gizmo.md)
- [Wooden NeoPixel Xmas Tree](https://learn.adafruit.com/wooden-neopixel-xmas-tree.md)
- [Now Playing: Bluetooth Apple Media Service Display](https://learn.adafruit.com/now-playing-bluetooth-apple-media-service-display.md)
- [PyLeap MP3 Playback for Circuit Playground Bluefruit](https://learn.adafruit.com/pyleap-mp3-playback-for-cpb.md)
