1
0
Fork 0

Expose acceleration data

Signed-off-by: Francesco Gazzetta <fgaz@fgaz.me>
This commit is contained in:
Francesco Gazzetta 2021-11-20 14:26:47 +01:00 committed by Daniel Thompson
parent 09af1440ef
commit c47c911fe3
2 changed files with 8 additions and 0 deletions

View file

@ -48,6 +48,10 @@ class Accelerometer:
def steps(self, value):
self.reset()
def accel_xyz(self):
# TODO randomly alter the values over time
return (0,0,0)
class Backlight(object):
def __init__(self, level=1):
pass

View file

@ -49,3 +49,7 @@ class BMA421:
if value != 0:
raise ValueError()
self._dev.reset_step_counter()
def accel_xyz(self):
"""Return a triple with acceleration values"""
return self._dev.read_accel_xyz()