From 7091f70b4677306d230f8015591eed5ca544d61d Mon Sep 17 00:00:00 2001 From: Kacper Date: Sat, 26 Feb 2022 23:04:22 +0000 Subject: [PATCH] Update lis3dh.py --- lis3dh.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lis3dh.py b/lis3dh.py index 4f46334..51df0c7 100644 --- a/lis3dh.py +++ b/lis3dh.py @@ -69,8 +69,10 @@ class lis3dh: self.i2c.i2c_rdwr(check_status, status) #while status.buf[0] != 0b1111: # sleep(0.00001) - self.i2c.i2c_rdwr(prepare_x, x)#, prepare_y, y, prepare_z, z) + self.i2c.i2c_rdwr(prepare_x, x) + self.i2c.i2c_rdwr(prepare_y, y) + self.i2c.i2c_rdwr(prepare_z, z) X = int.from_bytes(x.buf[0],"big") - #Y = int.from_bytes(y.buf[0]) - #Z = int.from_bytes(z.buf[0]) - return [X] \ No newline at end of file + Y = int.from_bytes(y.buf[0],"big") + Z = int.from_bytes(z.buf[0],"big") + return [X,Y,Z] \ No newline at end of file