mirror of
https://github.com/supleed2/ELEC60013-ES-CW1.git
synced 2024-12-22 21:45:48 +00:00
Update lis3dh.py
This commit is contained in:
parent
6c0806a377
commit
756b07f52a
|
@ -78,6 +78,7 @@ class lis3dh:
|
||||||
sleep(1)
|
sleep(1)
|
||||||
self.i2c.i2c_rdwr(check_status, status)
|
self.i2c.i2c_rdwr(check_status, status)
|
||||||
if (int.from_bytes(status.buf[0],"big") & 0b1111) == 0b1111:
|
if (int.from_bytes(status.buf[0],"big") & 0b1111) == 0b1111:
|
||||||
|
print("Status: ",status.buf[0], "\n")
|
||||||
self.i2c.i2c_rdwr(prepare_x, x)
|
self.i2c.i2c_rdwr(prepare_x, x)
|
||||||
self.i2c.i2c_rdwr(prepare_y, y)
|
self.i2c.i2c_rdwr(prepare_y, y)
|
||||||
self.i2c.i2c_rdwr(prepare_z, z)
|
self.i2c.i2c_rdwr(prepare_z, z)
|
||||||
|
|
Loading…
Reference in a new issue