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 (CPB). This is made possible by the new File Glider Application for iOS. This app allows you to connect to a CPB from your iOS device then you can transfer files to the CPB through the Files 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.

The Circuit Playground Bluefruit will be referred to as the "CPB" for the remainder for this guide.
As of the time of this writing, this app is only available for iOS devices. Please make sure your iOS device is updated to make sure File Glider works properly!

Parts

shot of a Black woman's neon-green manicured hand holding up a Circuit Playground Bluefruit glowing rainbow LEDs.
Circuit Playground Bluefruit is our third board in the Circuit Playground series, another step towards a perfect introduction to electronics and programming. We've...
$24.95
In Stock
USB cable - USB A to Micro-B - 3 foot long
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...
$2.95
In Stock

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

Lithium Ion Polymer Battery 3.7v 420mAh with JST 2-PH connector and short cable
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...
Out of Stock

OR

5V 2.5A Switching Power Supply with 20AWG MicroUSB Cable
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...
$8.25
In Stock

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 with  USB-A Connector
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...
$7.95
In Stock

CircuitPython 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 haven't already, you'll need to download the latest version of CircuitPython from the link below. For more on CircuitPython, check out this guide.

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.

Double-click the small Reset 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!)

You will see a new disk drive appear called CPLAYBTBOOT.

Drag the adafruit_circuitpython_etc.uf2 file to CPLAYBTBOOT.

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

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

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 from the App Store.

Using your iOS device, download the File Glider App.

You must have an iOS device in order to download this app. We are currently rewriting our BLE Android library to provide File Glider and PyLeap to Android users but this will not be ready until later.

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.

  • 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.
  • The app should then state "Status: connected..." 
  • Then a Bluetooth Pairing Request will pop up, select "Pair".
  • The board is now connected to the File Glider App!

Troubleshooting

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

Solution: 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.

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. 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.

The code cannot be transferred from the Files app to the Glider app if the CPB is connected to a computer. It must be powered separately from a computer.

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".

Temporarily unable to load content:
  • 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.

 

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 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.

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

  • 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.

Congrats you have just successfully programmed the CPB!

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!

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

This guide was first published on Feb 09, 2022. It was last updated on Jul 19, 2024.