Skip to main content

A python package to connect to the Bluetooth LE GATT services of paired bbc micro:bit devices

Project description

Kasper's microbit

Nederlands

Documentation Status Documentation Status

A python package to make a connection to a bbc microbit by means of the Bluetooth LE GATT services exposed by the microbit

Installation

$ pip install kaspersmicrobit

Example

import time

from kaspersmicrobit import KaspersMicrobit

CHANGE_THIS_TO_YOUR_MICROBIT_BLUETOOTH_ADDRESS = 'E3:7E:99:0D:C1:BA'


def pressed(button):
    print(f"button {button} pressed")


with KaspersMicrobit(CHANGE_THIS_TO_YOUR_MICROBIT_BLUETOOTH_ADDRESS) as microbit:
    microbit.buttons.on_button_a(press=pressed)
    time.sleep(10)

More examples can be found in the examples directory.

Api documentation

https://kaspersmicrobit.readthedocs.io

Troubleshooting

Problems related to connecting to the microbit over bluetooth are often solved by pairing your computer again to your microbit

See also: https://support.microbit.org/helpdesk/attachments/19075694226

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kaspersmicrobit-0.0.8.tar.gz (23.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

kaspersmicrobit-0.0.8-py3-none-any.whl (31.1 kB view details)

Uploaded Python 3

File details

Details for the file kaspersmicrobit-0.0.8.tar.gz.

File metadata

  • Download URL: kaspersmicrobit-0.0.8.tar.gz
  • Upload date:
  • Size: 23.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.0 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for kaspersmicrobit-0.0.8.tar.gz
Algorithm Hash digest
SHA256 028eefd3a6628bb9cbcef348adc48455d840d680a5fef3885a93bbd97ec84cda
MD5 9e0f75b2613eda7d0dfba288a8084a22
BLAKE2b-256 79a85ffcd25fe4191729a759932c6d872a0ca49bdf590b02de9e400094885590

See more details on using hashes here.

File details

Details for the file kaspersmicrobit-0.0.8-py3-none-any.whl.

File metadata

  • Download URL: kaspersmicrobit-0.0.8-py3-none-any.whl
  • Upload date:
  • Size: 31.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.0 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for kaspersmicrobit-0.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 a43d2ccb941316374b9114824e4e00123bb52e9fbf02af755234630c37322f76
MD5 d97832df2a153b7ca86a7a96947dc039
BLAKE2b-256 a0c9ac965b49c9d5634df3674946fabec2493cc9bd23a8a2e7ce2d058d7b24bf

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page