I’m building a macro keypad using the Keybow 2040, RGB Encoder and round LCD. My plan is to use the Keybow CircuitPython binary and ideally the MicroPython modules in the Pimoroni Pico image.
I’m not sure of the best way to go about this. Should I attempt to make a custom image which includes the relevant Pimoroni modules or should I try and build the C source code as mpy files and include them in my CircuitPython lib folder?
You need to decide between MicroPython (the modules you find in the Pimoroni repo) and CircuitPython. Since the KeyBow is CircuitPython based, I would not bother with the modules from Pimoroni. Porting them from MP to CP is usually simple, but in most cases not necessary. CP has 400+ libraries, all of them are extremely easy to install.
The C-source does not build as mpy - these files are precompiled .py files. You can build your own version of CircuitPython though (very simple thanks to Github codespaces), but again this is not really necessary since you can probably just use the existing libs for your breakout modules.
Thanks both, that’s been really helpful. I found a CircuitPython driver for the ST7789 display that the round LCD uses and managed to get some images displaying on the LCD using the displayio and busio modules. There’s a couple of helpful examples for Pimoroni displays, see below.
When your are already into CP, take a look at circup. Library installation is really very simple with this tool. It analyses your code and automagically installs all necessary driver modules. So you would e.g. copy some sample code from somewhere in the web, run circup and your ready to go.
Circup looks great, thanks for that. Think that will be useful for the encoder side of things.
@alphanumeric I’ve got all the parts already, so mostly looking to fit the software around that. That’s okay though, I was looking for a bit of a challenge!