I used a Trinket M0 because it’s small, cheap, and yet extremely capable. My current nodes use an ATMEGA328P and I could have done the same here and used an Arduino ProMini but it wouldn’t have been much cheaper, would have been larger, and the Trinket lets me write the code in CircuitPython.  The Trinket and CircuitPython are perfect for small, simple projects like this.

The circuit is simple (so simple I didn’t bother with a schematic or breadboarding before soldering it up): an output to control a small NeoPixel strip, and an I2C proximity sensor. It’s an application perfectly suited to a Trinket. Since I plan to run this off a 9v battery or a wall wart like you’d use with an Arduino UNO, I added a power port and 5v regulator. The TO-220 7805 regulator is bulky, but the NeoPixels do draw quite a bit of power.

I show a single Neopixel in the schematic, but any chain of Neopixels will work, as long as you don't exceed the available power.

This guide was first published on Jun 13, 2018. It was last updated on Jun 18, 2024.

This page (Hardware) was last updated on Mar 08, 2024.

Text editor powered by tinymce.