Skip to content
Bluetooth Low Energy (BLE) library for CircuitPython
Python
Branch: master
Clone or download
siddacious Merge pull request #61 from adafruit/dherrada-patch-3
Last, last pr for today (fixing rst in README)
Latest commit 14f9064 Jan 16, 2020
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github/workflows
adafruit_ble disabled unnecessary-pass for a problematic function Jan 12, 2020
docs Remove ANCS Dec 18, 2019
examples Remove Magic Light Dec 19, 2019
.gitignore Moved repository from Travis to GitHub Actions Dec 28, 2019
.pylintrc
.readthedocs.yml add cookiecutter files; UARTService now working with adafruit_bluefru… Jan 22, 2019
CODE_OF_CONDUCT.md squashed: Jan 8, 2019
LICENSE add cookiecutter files; UARTService now working with adafruit_bluefru… Jan 22, 2019
README.rst Merge pull request #61 from adafruit/dherrada-patch-3 Jan 16, 2020
requirements.txt Removed empty line Jan 13, 2020
setup.py Changed py_modules to packages in setup.py Jan 16, 2020

README.rst

Introduction

Documentation Status Discord Build Status

This module provides higher-level BLE (Bluetooth Low Energy) functionality, building on the native _bleio module.

Dependencies

This driver depends on:

Please ensure all dependencies are available on the CircuitPython filesystem. This is easily achieved by downloading the Adafruit library and driver bundle.

Installing from PyPI

Warning: This will not work with BLE on Linux

On supported GNU/Linux systems like the Raspberry Pi, you can install the driver locally from PyPI. To install for current user:

pip3 install adafruit-circuitpython-ble

To install system-wide (this may be required in some cases):

sudo pip3 install adafruit-circuitpython-ble

To install in a virtual environment in your current project:

mkdir project-name && cd project-name
python3 -m venv .env
source .env/bin/activate
pip3 install adafruit-circuitpython-ble

Usage Example

from adafruit_ble import BLERadio

radio = BLERadio()
print("scanning")
found = set()
for entry in radio.start_scan(timeout=60, minimum_rssi=-80):
    addr = entry.address
    if addr not in found:
        print(entry)
    found.add(addr)

print("scan done")

Contributing

Contributions are welcome! Please read our Code of Conduct before contributing to help this project stay welcoming.

Documentation

For information on building library documentation, please check out this guide.

You can’t perform that action at this time.