I’ve been trying to get the Qwiic Keypad (COM-15290) Example 1 to run on a Pi Zero W with python. I connect the keypad using the Qwiic Hat for the Pi. When I start the program it generates non-numeric characters for a while, even when I don’t touch the keypad, then crashes. If I try to key in a number there is a delay before the number is displayed, often with non-numeric characters interspersed, and again a crash.
Here are two example runs:
~/myScripts/keypad $ python qwiic_keypad_ex1.py
SparkFun qwiic Keypad Example 1
Initialized. Firmware Version: v 127.127
Press a button: * to do a space. # to go to next line.
?Traceback (most recent call last):
File “qwiic_keypad_ex1.py”, line 91, in
runExample()
File “qwiic_keypad_ex1.py”, line 66, in runExample
myKeypad.update_fifo()
File “/usr/local/lib/python2.7/dist-packages/qwiic_keypad.py”, line 229, in update_fifo
self._i2c.writeByte(self.address, KEYPAD_UPDATE_FIFO, 0x01)
File “/usr/local/lib/python2.7/dist-packages/qwiic_i2c/linux_i2c.py”, line 180, in writeByte
return self.i2cbus.write_byte_data(address, commandCode, value)
IOError: [Errno 121] Remote I/O error
~/myScripts/keypad $ python qwiic_keypad_ex1.py
SparkFun qwiic Keypad Example 1
Initialized. Firmware Version: v 1.0
Press a button: * to do a space. # to go to next line.
23??456??78??9 123Traceback (most recent call last):
File “qwiic_keypad_ex1.py”, line 91, in
runExample()
File “qwiic_keypad_ex1.py”, line 66, in runExample
myKeypad.update_fifo()
File “/usr/local/lib/python2.7/dist-packages/qwiic_keypad.py”, line 229, in update_fifo
self._i2c.writeByte(self.address, KEYPAD_UPDATE_FIFO, 0x01)
File “/usr/local/lib/python2.7/dist-packages/qwiic_i2c/linux_i2c.py”, line 180, in writeByte
return self.i2cbus.write_byte_data(address, commandCode, value)
IOError: [Errno 121] Remote I/O error
The keypad works fine on an Arduino ; there are no extra characters. I’ve tried it on two Pi Zero Ws, and both showed this problem. However, I don’t have any problems running the Qwiic joystick example on the Pi Zero W.
Any suggestions?