mirror of
https://github.com/supleed2/ELEC60013-ES-CW1.git
synced 2024-11-10 01:35:50 +00:00
Update lis3dh.py
This commit is contained in:
parent
39b971a3c6
commit
53b5f4cc19
|
@ -69,8 +69,8 @@ class lis3dh:
|
||||||
self.i2c.i2c_rdwr(check_status, status)
|
self.i2c.i2c_rdwr(check_status, status)
|
||||||
#while status.buf[0] != 0b1111:
|
#while status.buf[0] != 0b1111:
|
||||||
# sleep(0.00001)
|
# sleep(0.00001)
|
||||||
self.i2c.i2c_rdwr(prepare_x, x, prepare_y, y, prepare_z, z)
|
self.i2c.i2c_rdwr(prepare_x, x)#, prepare_y, y, prepare_z, z)
|
||||||
X = int.from_bytes(x.buf[0])
|
X = int.from_bytes(x.buf[0])
|
||||||
Y = int.from_bytes(y.buf[0])
|
#Y = int.from_bytes(y.buf[0])
|
||||||
Z = int.from_bytes(z.buf[0])
|
#Z = int.from_bytes(z.buf[0])
|
||||||
return [X,Y,Z]
|
return [X]
|
Loading…
Reference in a new issue