From e534469ab57867f198bb6b8142a5765264d1b9c5 Mon Sep 17 00:00:00 2001 From: Kacper Date: Sat, 26 Feb 2022 23:36:07 +0000 Subject: [PATCH] Update lis3dh.py --- lis3dh.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lis3dh.py b/lis3dh.py index 6bc8b7b..753e518 100644 --- a/lis3dh.py +++ b/lis3dh.py @@ -73,7 +73,7 @@ class lis3dh: prepare_z = smbus2.i2c_msg.write(self.addr, [0x2C]) status = smbus2.i2c_msg.read(self.addr, 1) self.i2c.i2c_rdwr(check_status, status) - while status.buf[0] != 0b1111: + while (status.buf[0] & 0b1111) != 0b1111: print(status.buf[0], "\n") sleep(1) self.i2c.i2c_rdwr(check_status, status)