Expose acceleration data
Signed-off-by: Francesco Gazzetta <fgaz@fgaz.me>
This commit is contained in:
parent
09af1440ef
commit
c47c911fe3
2 changed files with 8 additions and 0 deletions
|
@ -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
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue