Posts with «general» label

Speed up CircuitPython LED animations 10x!

In many LED animations, you need to apply an operation to all LEDs as fast as possible. Often this is “fadeToBlackBy”, i.e. “dim all LEDs by some amount”. There are some common effects that you can easily get back using that and one other action. For example: the Cylon effect is “Turn an LED on, [...]

Multiple Displays in CircuitPython & Compiling Custom CircuitPython

Did you know you can run multiple displays in CircuitPython? One way: wire up two displays in parallel. There’s also true dual displays, more on that in a bit. For the above, here’s the wiring diagram and the code “”. Note how the second display is hooked up in parallel and the code just sees [...]
Todbot 20 May 02:30

Enclosure ideas for WiFiChron and other clocks

It turns out that most electronics, even prototypes, can be easily enclosed with Lego. And that means no screws, no glue, no fasteners, zero tools, just the bricks and some imagination.

This is the HDSP clock variant with 1" displays driven by HT16K33 (introduced here). The board was cut and filed (0.5mm on each side) to fit snug between the walls (see this).

Next is a HDSP clock variant with two Adafruit Quad Alphanumeric displays.

Similarly, the PCB was cut and filed a bit. The assembly fits solidly between the bricks (no movement when shaken). As in the previous build, the exposed PCB is kind-of-required to allow access to the two buttons (set hours, set minutes).

Both of the above can be mounted on a Lego wall (as found in schools) or they can desk-stand on their own.

Here is an example of a Lego-encapsulated WifiChron.

The PCB was also filed about 0.5mm on each side to fit between the lateral brick walls. It did not have to be fastened in any other way. The ESP8266 module fits inside nicely. The 3 buttons and the USB mini B connector are all easily accessible from the back.

Below is the Lego version of the Axiris clock.

Since it does not have any buttons, the time is set through Bluetooth (command "SET TIME=hh:mm", sent from Terminal app while BT paired).

And finally, a couple of OLED clocks, both running the same software on similar hardware: pro-mini + OLED shield and wsduino + 2.42" OLED shield, respectively.

Note that this is the prototype version, using a LiPo battery with charger (similar to the one shown here).

Again, all the above enclosures feel solid: nothing moves or rattles when upside down or even shaken. I did not try dropping them though :)

And lastly, the WiFiChron with Adafruit quad 0.56" displays from the previous post, sandwiched between scrap plexiglass plates:

Get HID Report Descriptors with “win-hid-dump” & “mac-hid-dump”

I help support the USB HID projects hidapi and node-hid. One of the aspects of HID that isn’t clear is that HID devices transmit and receive data with “reports”, fixed-size data packets, and that reports a device respond to is described by the HID Report Descriptor it hands to the OS. The OS then only [...]
Todbot 29 Jan 07:28

DIY Neopixel / WS2812 Development Kit

If you are like me, you play around with Neopixel / WS2812-style LEDs a lot. Normally I solder my own custom-connectors and don’t use the ones that come with the reels I buy. But since we’ve been playing around with WS2812-compatible Xmas lights, I decided to make a “Neopixel Dev Kit” for easier experimenting with [...]
Todbot 08 Jan 21:09

WS2812-compatible “fairy light” LEDs that know their address

I’ve not done much on our plotter Xmas tree this week because, well… if you follow me on Twitter, it’s likely you’ve seen me ramble on about these crazy new Christmas Tree lights we got for our tree (first tree ever!). They appeared to maybe be WS2812 / Neopixel compatible and yup, they were! But [...]
Todbot 01 Jan 21:49

Precise flood fill with AxiDraw

We recently got some inexpensive multicolored 0.3mm technical markers (AmzAffil) for use on the AxiDraw and they are pretty good! For this week’s batch of days for our 31-box AxiDraw calendar, I wanted to play with doing “flood fill” / solid color fills. Normally the “hatch fill” extension part of the AxiDraw Inkscape extensions creates [...]
Todbot 18 Dec 23:05

Playing with AxiDraw for the Holidays

For the month of December, Carlyn and I are making a vaguely tree-shaped “calendar” with 31 boxes, 30mm x 30mm each. This is a design exercise to get us more familiar with the very fun EMSL AxiDraw, an easy-to-use pen plotter. We each get half of the days, randomly, and each of those days’ boxes [...]
Todbot 11 Dec 21:59

MagTag Day of Week

I’ve been very excited by CircuitPython’s move into the ESP32-S2 space. The ESP32-S2 is a WiFi-enabled microcontroller with built-in USB and a crypto engine so it can do HTTPS properly. And in Python! CircuitPython is much more pleasant than Arduino for network-based tasks, where there’s lots of string processing. So for this week’s Deep Fried [...]
Todbot 20 Nov 20:26

Converting Pixel Art for Matrix Portal

I tried my hand at pixel art and discovered I cannot do it. But I wanted to honor Justin in a pixel arty way, so I instead tried my hand at converting some of his pixel art for display on a 32×64 RGB LED matrix driven by a Matrix Portal driving. This wasn’t so easy. [...]
Todbot 30 Oct 21:15