-
Short answer is if there are only a couple then do it by hand, otherwise this script will save you a bit of time. I had nearly a hundred, and was curious on the state of the adafruit-io python library, so this happened :shrug:
-
Wippersnapper
For those not in the know, WipperSnapper is Adafruit's plug-and-play firmware, which runs on their IO (think IOT) platform, offering free* data history(feeds) with graphs, dashboards, and automatic actions/triggers (along with integrating with other platforms like IFTTT). There is a paid upgrade for longer history, unlimited devices, SMS alerts, etc.
I love it because it's super quick and easy to test a sensor works, and to just get some data recording quickly.
Goto a web-page, flash over usb, add sensors via control panel (feeds + graphs are automatic), done.
Under the hood it's an arduino sketch, so adding additional sensors via github pull requests is surprisingly easy (I've added a few because it makes my future tasks easier).
-
Mad With Power, or just keeping it on the down-low... There's a few good reasons to want to create or use a custom bundle of libraries for circuitpython!
Perhaps you write educational guides and lesson plans and want to have all your custom requirements in once easy to use place. Maybe you've got enough private, rudely-named, or trademark-infringing libraries / drivers / helpers for CircuitPython that you won't add to the community bundle, but still want the convenience of
circup
(the package manager for CircuitPython).I love having a package manager for circuitpython (currently supports USB mass storage based devices, but theres a pull-request for web-workflow suppport).
circup install --auto --py
and I get all my dependencies in readable form, modifiable even if I so wish!So a recent pull request caught my attention, for circup-depenencies that weren't in the pypi repository (python package hosting used by `pip`) yet or at all. That's the exact state of my libraries!
I also was aware of seeing a bundle-add option for circup, used to add custom library bundles, so this weekend was time to bring it all together.
Minor Yak Shaving - Get Library Ready
I've cleaned up the library enough to have a releasable thing, but never sorted the docs. The project is a fork of a Sensirion python library, for which I actually have permission to use their name, but to avoid any issues I wanted to have a way without friction, like a custom library bundle. Anyway the docs use Sphinx, and the read-the-docs theme, but are an old form of config etc, so I cleaned up that to the point of publishing to github pages.
Then I could setup a pyproject.toml file with a
[circup]
section, and inside a field calledcircup_dependencies
with an array of strings. Similar to this: -
A quick and dirty example of something I wanted for my devices, allowing inexperienced users to setup the device themselves, and once setup they can also remotely modify the code / download data.
Also always be sure which network it's on, the IP address, and have a handy way to jump on the same network.I plan to have this run on bootup for 10seconds before the main program runs (depending on network need etc). I may also alternate between this and the sensor data screens. Long term they'd all be pages/tiles in lvgl.
The main reason for this note, was the observation that Black and White QRcodes are too bright for my phone to read, and I had to change both colours to reduce the contrast as theoretically the brightness is already at 25mA minimum.
I pondered on less blue being the most effective, as it's almost treated like white by the phone. I settled on these colours that look incredibly dark rendered as HTML, while on screen look like mid-toned blue with strong backlight and black dotted coding QRcodes, but on camera look almost white and black and work much more reliably.
qr_color=
0x121212
(HTML #121212)qr_bg_color==
0x0000aa
(html#0000AA
) -
So you've had a cunning plan in the middle of the night, and awoken to find it scrawled on some paper for fear of forgetting.
Now in the cool light of day you realise you have a great idea in front of you, all the pieces are there (maybe you jot a couple more points down), but very little idea of how to achieve the detail. -
-
Remake this with kb2040.
Should be possible to ask for expected key sequence beforehand, then do really fast pin testing as each key is held down for a second or so. Might have to have the first key held of longer until a mapping match is found, similarly with rows if key not detected, follow onscreen prompts.
Accept key sequence as tuple of tuples or string, to allow basic keys or also row/col for more gamepad/midi/accessibility/unthinkable inputs.
Have config mode with usb storage disabled if after reset the onboard button is held at 2s, suggest to user after counting 1 long second (it checks at 2). Save keymap in toml or JSON or both, with a name or next available Id. Include number of pins and check files for possible matches of unknown future keypads, prioritizing those mapping attempts over other sequences.
https://hackaday.com/2023/10/12/keypad-interface-module-reverse-engineers-pinouts-so-you-dont-have-to/
-
Explore
Groups to get your gears turning