The reason to go CircuitPython is to get HID and MIDI modules.
The Pimoroni MicroPython UF2 example for the RGB Keypad Base works very well and it is easy to detect keystrokes and light-up LEDs from the command line. However, the lack of HID and MIDI modules reduces the potential of the Base.
Also, Pimoroni have not documented the modules included in their Custom MicroPython UF2, which is why I want to create my own CircuitPython alternative so that when the next release of CircuitPython appears, I won’t have to wait for Pimoroni to update their custom version. (It would be helpful if MicroPython allowed the import of new library modules in the same way that CircuitPython does. Then Pimoroni could have given us a module file.
An additional problem is that the MicroPython example scan.py, which should scan I2C ports fails to run.
Traceback (most recent call last):
File "<stdin>", line 5, in <module>
OSError: [Errno 5] EIO
That is the first line of the program that tries to write to the I2C port. I have not found that method documented, but I assume the 76 is the address.
i2c.writeto(76, b'123')
Another problem is that the pico-example bus-scan.c checks all the addresses and reports no I2C devices.
Adafruit have working CircuitPython modules that run Dotstar LEDs (e.g. APA 102) on both the SPI port and by bitbanging other pins. I think the RGB Keypad Base connects the ADA102 LEDs to the SPI and CS pins, but it would be nice to know that from Pimoroni.
I’m sure that their MicroPython I2C modules work well because of their RGB Keypad Base example and because of the success that Sandy had with CircuitPython and the KeyBow RP2040. Finally, Sandy has also shown that there are working HID and MIDI modules on Circuit Python.
The TCA9555 IO expander returns a 16 bit data word in which each bit represents the state of one key. Thats why the returned values are 1,2,4,8,16… 32768. However, unless I can get this and other devices working on the I2C port, there will be no chance to get a small OLED screen connected.
Pimoroni have resolved the I2C problems with MicroPython and the support of Dotstar LEDs. It would be helpful if they would show us how they did it so that we can get the most value from their RGB Keypad Base.