Overview

This package supports to get event of bluetooth device for your application.

Installation

$ wget https://github.com/akihiro-yoshii/bt_button/releases/download/v0.3.0/bt_button-0.3-py3-none-any.whl
$ pip install bt_button-0.3-py3-none-any.whl

How to use

You can get button instance and register callback function as below.

import bt_button

button = bt_button.AbShutter([MAC ADDRESS])
button.add_released_listener(released)
button.connect()

def released(event):
    print(event)
    print("Released!")

And you can get below result.

event at 1613224432.342770, code 115, type 01, val 00
Released!

Sample Implementation

Please refer sample/main.py

Indices and tables