#PicoCalc
1 messages · Page 1 of 1 (latest)
This bug fix might have improved things: https://github.com/clockworkpi/PicoCalc/pull/25
If you install regular CircuitPython (not the Picoware version) on whatever Pi Pico you are (using the proper version), you could test whether that bug fix works via:
import busio
i2c = busio.I2C(scl=board.<proper SCL pin>, sda=board.<proper SDA pin>) # I don’t know the pins needed
i2c.try_lock()
i2c.scan()
this is what apparently didn't work for people previously, but I don't know if it now works with the latest firmware on the keyboard board on the PicoCalc. I am not going to spend a lot of time on this, especially because it's so difficult to get a PicoCalc, but would be interested in what the test above shows
Im busy until later today but I will try that out for you later!
the earlier complaints were that the kbd was not detected. looking at some doc, 31 (0x16) is the address for the keyboard, so that's a really good sing
but someone would still need to write a driver for the keyboard in CircuitPython. Picoware does that in C, not Python.
Thats beyond what im capable of, but its still a good sign
Here is a code.py cooked up by Claude using some info from https://github.com/LofiFren/code-skills/blob/main/skills/picocalc-hardware/picocalc-hardware/references/keyboard-protocol.md
let me know if this runs at all. Press keys on the PicoCalc kbd to get it to respond
Sure ill give it a go, cheers
If it doesn't work, try removing the , frequency=10000 in the busio.I2C line. I think that may be an LLM misinterpretation of the keyboard scan rate
oh, that's fantastic! Try removing that frequency= anyway and see if it still works. I want to publish this as an example in their form
thanks very much for this testing. So whatever problem there was with CircuitPython I2C I think is gone. I'll bet it was fixed by https://github.com/clockworkpi/PicoCalc/pull/25 I mentioned above
I bet thats true
and its no problem, this testing helps me too! I might not be able to write the appropriate drivers (including screen) but the fact the keyboard DOES work should encourage other people who might have that skillset to try it
I reported your success in https://forum.clockworkpi.com/t/circuitpython-i2c-and-picocalc-i2c-keyboard/22370. You may want to keep an eye on that. I didn't put anything in the discord.
I appreciate the help you have given, I may look into getting the screen working and the keyboard and see if I can write up some basic programs, it was essentially my aim to use the device as a place to practice some circuitpython
there's some implication in the forums that it's harder to deal with the REPL due to how USB is set up on the PicoCalc, and whether CircuitPython supports REPL over UART or not (which it doesn't right now on those boards without a custom build).
I managed fine connecting it to thonny and using the REPL through that but worst case scenario I can deal with just dropping new code.py into it every time haha
Im not urgently after using the device itself to program...itself
Display be working, this is using someone elses test code and a driver written by someone else, but at least its working!
Bitmap display works, colours inverted so ill look into that
Anyway, huge thanks @rugged crystal if it wasnt for your help I probably would have given up entirely but now I see a way forward towards actually getting some circuitpython fun using this!
you're welcome!
correct me if im wrong, circuitpython has some degree of support for keyboard matrices and such?
Yes, https://learn.adafruit.com/key-pad-matrix-scanning-in-circuitpython, but that's for raw matrices and keys, or maybe with an IO expander. Not anything like the whole separate microcontroller board on the PicoCalc.
the test program I gave you talks to it fine. You just need to interpret what it receives. There are other functions over I2C available. Not sure where the documentation is. I pointed to something above but it is an AI distillation of the documentaiton.
assuming there is any documentation, clockwork is kind of notorious for their documentation to be spotty, its very much a "if you want it to do it im sure youll work it out" kind of device
oh, lofifren to the rescue
there are other boards sort of like the PicoCalc, but it has a nice form factor. https://circuitpython.org/board/m5stack_cardputer/ for example
https://circuitpython.org/board/adafruit_fruit_jam/ has USB host so you can plug in a keyboard and has HDMI output
Yeah, i have recommended my friend grab the cardputer maybe if they want a cheaper alternative to messing around with