Add code to initialize a Bluetooth HCI adapter. The current pins should work for the on-board adapter on Metro M4 AirLift, PyPortals, and PyBadge AirLift. That is, all you need is:
ble = BLERadio()
For an offboard AirLift breakout, the kind of code below works for now. We can think about changing this API to pass the pins to BLERadio(). I haven't thought about this API in detail yet.
import _bleio
import board
hci.esp32_hci_init(
esp_reset=board.D12,
esp_gpio0=board.D10,
esp_busy=board.D11,
esp_cs=board.D13,
esp_tx=board.TX,
esp_rx=board.RX,
debug=True)
# Must use initialized adapter explicitly.
ble = BLERadio(_bleio.adapter)
Goes with https://github.com/adafruit/circuitpython/pull/3310.
Add code to initialize a Bluetooth HCI adapter. The current pins should work for the on-board adapter on Metro M4 AirLift, PyPortals, and PyBadge AirLift. That is, all you need is:
For an offboard AirLift breakout, the kind of code below works for now. We can think about changing this API to pass the pins to
BLERadio()
. I haven't thought about this API in detail yet.