Overview
PyLeap is an iOS, iPadOS and Android app that allows users to easily download code files and assets and transfer them to Adafruit devices using Bluetooth Low Energy (BLE) or WiFi.
With PyLeap, users can quickly and conveniently transfer code files and assets from our Adafruit Learn Systems to their Adafruit devices, allowing them to take their projects to the next level.
This app is designed from the ground up for Adafruit devices that use an nRF52840 for Bluetooth Low Energy (BLE) or an ESP32-S2 TFT feather for Wi-Fi. You can pick one up from the Adafruit Shop along with other accessories:
Download the PyLeap app from the Apple App Store or the Google Play Store per your device type.
Page last edited May 15, 2024
Setting Up CircuitPython
Install CircuitPython
Currently, PyLeap requires Adafruit Boards to run Circuit Python on its board. If you haven't already, you'll need to download the latest version of CircuitPython from the link below.
Plug your Adafruit device into your computer using a good data-capable USB cable.
Many people use charge-only USB cables, which is very frustrating, I'm sure! So make sure you have a USB cable suitable for data sync.
Double-click the small Reset button on the Adafruit device (indicated by the red arrow in the image).
A LED will turn red, and then it will turn green. If they turn red and stay red, check the USB cable, try another USB port, etc. The tiny 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!)
Page last edited May 15, 2024
Bluetooth Pairing
After uploading the correct firmware, disconnect your device from your computer and power it via LiPoly or AAA battery pack.
Pairing device to PyLeap
Once powered, press the small Reset button in the center of the board (Circuit Playground Bluefruit) or on the top right of the board (CLUE). When the blue light flashes, press the Reset button again.
When done correctly, the LEDs flash yellow, followed by solid blue. Once this occurs, the board will continuously be in discovery mode.
Scan & Connect
When your Adafruit device is in discovery mode, hold it very close to your iPhone or iPad to pair.
Below the spinning Blinka, you'll notice a status indicator that will let you know your current pairing status.
Once you've found your device and received the Bluetooth Pairing Request message, press Pair to pair your board to your iPhone or iPad.
If your Circuit Playground Bluefruit doesn't appear:
- Verify that the green On light is lit.
- Make sure your Adafruit device is running the correct firmware. See the CircuitPython page in this guide.
- Try resetting the Adafruit device by pressing the small Reset button near the center of the board.
Page last edited May 15, 2024
WiFi Pairing
Setup WiFi Credentials
PyLeap depends on adding WiFi credentials to detect Adafruit devices over WiFi.
Create a file with the name settings.toml in the root directory of the CIRCUITPY drive.
Add the following below:
The file contains the keys CIRCUITPY_WIFI_SSID and CIRCUITPY_WIFI_PASSWORD. Once these are defined, CircuitPython will automatically connect to the network and start the webserver used for the workflow.
The web server is on port 80 unless overridden by CIRCUITPY_WEB_API_PORT. It also enables MDNS.
Here is an example settings.toml:
# To auto-connect to Wi-Fi CIRCUITPY_WIFI_SSID="YOUR-WIFI-NETWORK-NAME" CIRCUITPY_WIFI_PASSWORD="YOUR-WIFI-NETWORK-PASSWORD" # To enable modifying files from the web. Change this too! # Leave the User field blank in the browser. CIRCUITPY_WEB_API_PASSWORD="passw0rd" CIRCUITPY_WEB_API_PORT=80
Drag the settings.toml file to the CIRCUITPY drive.
Open the PyLeap app. Select WiFi and scan for Adafruit devices.
After seeing the spinning Blinka animation, you should see a screen with WiFi devices found. Once you've found your device in the peripheral device list, press the Connect button to continue.
If WiFi devices were not found, either rescan for WiFi devices or double check your WiFi credentials.
Page last edited May 15, 2024
Troubleshooting
If you happen to witness this message "Disconnected: Peer removed pairing information " while pairing to a Bluetooth device, there is a way to remedy that.
Go to your Settings app, go to the Bluetooth setting, and delete your Adafruit device from the list.
Once you've removed the Circuit Playground Bluefruit device from your device list, for good measure, reset the PyLeap app as well.
Page last edited May 15, 2024
Modules
Once connected, the app will display a list of projects for you to choose from.
Choose one of the projects in the list and go to its related page in this guide to learn more.
- Glide on over to some Rainbows
- MP3 Playback
- NeoPixel Sound Meter
- NeoPixel Light Meter
- Touch NeoPixel Rainbow
- Button Controlled NeoPixels
- WAV Playback
- Tone Piano
And more!
Press the "Run it" button to download and transfer complete projects to your device.
Page last edited May 15, 2024
Pairing
Now that you're done uploading the correct firmware, disconnect your device from your computer and power it via LiPoly or AAA battery pack.
Pairing device to PyLeap
Once powered, press the small Reset button in the center of the board (Circuit Playground Bluefruit) or on the top right of the board (CLUE). When the blue light flashes, press the Reset button again.
When done correctly, the LEDs will flash yellow followed by solid blue. Once this occurs, the board will continuously be in discovery mode.
Scan & Connect
When your Circuit Playground Bluefruit or Adafruit CLUE is in discovery mode, hold it very closely to your iPhone or iPadOS to pair.
Below the spinning Blinka, you'll notice a status indicator that will let you know your current pairing status.
Once you've found your device and received the Bluetooth Pairing Request message, press Pair to pair your board to your iPhone or iPadOS.
If your Circuit Playground Bluefruit doesn't appear:
- Check to see if your Circuit Playground Bluefruit is powered on. Verify that the green On light is lit.
- Make sure your Circuit Playground Bluefruit is running the correct firmware. See the CircuitPython page in this guide.
- Try resetting the Circuit Playground Bluefruit by pressing the small Reset button near the center of the board.
Page last edited May 15, 2024