toggl-zei-py/zei/Zei.py
2020-08-12 18:45:40 +02:00

17 lines
466 B
Python

#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
from bluepy import btle
from . import ZeiOrientationChar
from . import ZeiDelegate
class Zei(btle.Peripheral):
def __init__(self, *args, **kwargs):
btle.Peripheral.__init__(self, *args, **kwargs)
self.withDelegate(ZeiDelegate.ZeiDelegate(self))
# activate notifications about turn
self.orientation = ZeiOrientationChar.ZeiOrientationChar(self)
self.orientation.enable()