Getting Started
Adafruit Playground is a wonderful and safe place to share your interests with Adafruit's vibrant community of makers and doers. Have a cool project you are working on? Have a bit of code that you think others will find useful? Want to show off your electronics workbench? You have come to the right place.
The goal of Adafruit Playground is to make it as simple as possible to share your work. On the Adafruit Playground users can create Notes. A note is a single-page space where you can document your topic using Adafruit's easy-to-use editor. Notes are like Guides on the Adafruit Learning System but guides are high-fidelity content curated and maintained by Adafuit. Notes are whatever you want them to be. Have fun and be kind.
Click here to learn more about Adafruit Playground and how to get started.
-
Simple Python Lithophane Generator
There are plenty of existing tools for generating 3D printable lithophane files from an image source file. Some of these are online and do everything in a browser and generally work fine. But I wanted something that would run locally. A lithophane is conceptually simple: print thickness = image brightness. Throwing Python at this seemed like it should be doable. And it is! And has been done. A lot! There are numerous examples of this approach out there as well. However, all the ones I found seemed overly complex, relying on numpy, etc.
So I decided to try writing my own and keeping it as simple as possible. The resulting code is available in this Github repo:
And the resulting prints turned out pretty good :)
-
MEMENTO Camera Front 3D Print
This is a simple front plate for use with an Adafruit MEMENTO camera and the available enclosure kit. There is a more enclosed (and super cute) 3D printable case option here that works with just the base camera. But I like the look of the "open frame" style of the enclosure kit. Also, I find I don't use the front facing NeoPixels for photographic lighting, but do use them as general purpose indicators. So this 3D printable plate sits on top (on front?) of the NeoPixel plate, covering them and providing some diffusion. There is also a simple bump out handle to aid in holding. It should work with the fasteners included with the enclosure kit.
-
Super Basic RGB Matrix Driver Example
The other day I decided to level up my understanding of how these popular "HUB75" style RGB LED matrices work. So I sat down with the intent to write the most basic bit bang example I could come up with. Here I share the resulting code, written in CircuitPython.
There are plenty of Google discoverable write ups on these that go into lots more detail, discussing the shift registers, scan lines, etc. It's worth reading a few of those first. We found these to be useful:
- Everything You Didn't Want to Know About RGB Matrix Panels - A good write up with some nice animations by Nick Poole at Sparkfun who needed to also understand how these work to modify an Arduino library for an unsupported panel type.
- RGB LED Panel Driver Tutorial - read the "Theory of Operation" section.
- Driving a 64*64 RGB LED panel with an FPGA - read everything up to "Driving the matrix".
There's also a brief description in the Adafruit Learn System here:
These discussions can quickly get a bit complex, since there are a lot of pieces that work together in concert. However, there are a lot of things that are redundant. For example, how each red/green/blue LED is controlled is the same. Also, the matrices are typically split into upper and lower halves, but each is updated in the same way - R1/G1/B1 for the upper half, R2/G2/B2 for the lower half. So to keep things as simple as possible, this example does the following:
- Only use a single color
- Only work with the upper half of the matrix
This greatly reduces the total number of pins needed. It also really helps focus on the basic way in which data is moved into the matrices. By using just the upper half, the R2, G2, B2 pins can be left unused. And by focusing on just one color, we can use any one of R1, G1, or B1.
A Feather RP2040 was used with the following pin connections (Feather to Matrix):
- 13 to R1 (or G1 or B1 - your choice!)
- SCK to CLK
- MOSI to LAT
- MISO to OE
- A0 to A
- A1 to B
- A2 to C
- A3 to D
- GND to GND
There's nothing special about these pin choices - any digital pins could be used.
The matrix used was an Adafruit 32x32 4mm pitch panel (PID 607).