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

This guide was first published on Feb 09, 2022. It was last updated on Jun 17, 2024.

This page (Code the CPB) was last updated on Jun 17, 2024.

Text editor powered by tinymce.