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 Shield Wiring
If you have an Adafruit AirLift ESP32 Shield, you will need to solder three jumpers closed on the bottom
side of the board to enable BLE. The rest of the ESP32 pins you need are already jumpered to certain
shield pins.
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:
adafruit_airlift
adafruit_ble
© Adafruit Industries
https://learn.adafruit.com/adafruit-airlift-shield-esp32-wifi-co-processor
Page 36 of 56