diff --git a/qwiic_keypad.py b/qwiic_keypad.py index e8d0da3..339d402 100644 --- a/qwiic_keypad.py +++ b/qwiic_keypad.py @@ -217,4 +217,10 @@ def update_fifo(self): @return No return value """ # set bit0, commanding keypad to update fifo - self._i2c.writeByte(self.address, KEYPAD_UPDATE_FIFO, 0x01) + # Wrap in try-catch to fix issues in the bus on Raspberry Pi + # and to ensure its reliability + try: + self._i2c.writeByte(self.address, KEYPAD_UPDATE_FIFO, 0x01) + except IOError: + pass +