Simple test

Ensure your device works with this simple test.

examples/airlift_simpletest.py
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
# SPDX-FileCopyrightText: 2020 Dan Halbert, written for Adafruit Industries
#
# SPDX-License-Identifier: Unlicense

# Test works for boards with onboard adapters.

import _bleio
from adafruit_airlift.esp32 import ESP32

esp32 = ESP32()
adapter = esp32.start_bluetooth()
_bleio.set_adapter(adapter)  # pylint: disable=no-member

print(_bleio.adapter.address)