CircuitPython BLE
CircuitPython BLE UART Example
It's easy to use Adafruit AirLift ESP32 co-processor boards for Bluetooth Low Energy (BLE) with
CircuitPython. When you reset the ESP32, you can put it in WiFi mode (the default), or in BLE mode; you
cannot use both modes simultaenously.
Here's a simple example of using BLE to connect CircuitPython with the Bluefruit Connect app. Use
CircuitPython 6.0.0 or later.
Note: Don't confuse the ESP32 with the ESP32-S2, which is a different module with a similar name. The
ESP32-S2 does not support BLE.
Currently the AirLift support for CircuitPython only provides BLE peripheral support. BLE central is
under development. So you cannot connect to BLE devices like Heart Rate monitors, etc., but you can
act as a BLE peripheral yourself.
Adafruit AirLift ESP32 Breakout Wiring
If you have an Adafruit AirLift ESP32 Breakout board, you'll need to wire it to your microcontroller board.
The following example shows it wired to a Feather M4. You can choose different pins for GPIO0, BUSY,
and !RST, but the pin choices below correspond to several other boards, for consistency. If you do
change the pins, keeping the TX and RX pins the same is a good idea. If you choose different pins, you'll
need to edit the example program below.
Update the AirLift Firmware
You will need to update the AirLift's firmware to at least version 1.7.1. Previous versions of the AirLift
firmware do not support BLE.
Follow the instructions in the guide below, and come back to this page when you've upgraded the AirLift's
firmware:
https://adafru.it/RdC
Ensure the AirLift firmware is version 1.7.1 or higher for BLE to work.
Install CircuitPython Libraries
Make sure you are running the latest version of Adafruit CircuitPython (https://adafru.it/Amd) for your
board; you'll need 6.0.0 or later.
Next you'll need to install the necessary libraries to use the hardware and BLE. Carefully follow the steps
to find and install these libraries from Adafruit's CircuitPython library bundle (https://adafru.it/uap). Our
CircuitPython starter guide has a great page on how to use the library bundle (https://adafru.it/ABU).
Install these libraries from the bundle:
https://adafru.it/RdC