Skip to content

2022

Silver Saucer Progress (January 2022)

When I’m not doing something podcast related, I’m still trying to find time to code.

With the football games in the background, I was able to build off my last post, which would convert an image to Bitmap if I had it.

I made sure I had it today. Using the requests library, I implemented the ability to go get the photo and pass it to Pillow to conversion. The process looks like this:

  1. Request image URL location from Discogs via the authenticated API
  2. Get the request object and write it to disk
  3. Use the object to pass it to Pillow, which converts and saves it.

It was easier than I expected. I have two things to do:

  1. Only download the image if I’m the one logged in
  2. I was only to save it in the default directory, I need to store the the images in the static directory.

I’m not 100% sure the project is going to work. Technically, it will work. But I should really be about 12 feet away from the LED matrix to see the display in the right light. Currently I’m about three feet away and it doesn’t look the best. Looking around my home office, there isn’t a great place put it. I also need to learn how to take better pictures of LEDs.

Those two things plus wiring up MQTT equals done. Getting close now. The pictures look much better in person.

Sugar's Copper Blue album artwork displayed on a 64 by 64 matrix

Sugar's Copper Blue album standing up  next to itself displayed on a 64 by 64 matrix

Introducing The CircuitPython Show

CircuitPython Show

I’ve decided to start a podcast! The very original show name is The CircuitPython Show, about - you guessed it - CircuitPython! More specifically, about the people and the cool things they're doing with CircuitPython.

The show will be a question and answer style interview podcast. I’m shooting for each episode to be about 30 minutes. I’ll interview a person in (or around) the CircuitPython community and it will give listeners an opportunity to learn more about that person.

I’m still a ways out from releasing episodes. I’m planning on six episodes for season one and I’ve been emailing invites out to potential guests. So far I have three confirmed guests so I still have a little work to do. If you have any guest recommendations or want to be on the show, please let me know! (Really, please!)

I’m brand new to all this and I’m sure it will take me a few episodes to find my “voice”. I’m recording a teaser trailer and already I’m learning how hard this is! But if you’ll stick with me, I’m guessing the episodes will get better as I go along. I've really enjoyed my time in the CircuitPython community, especially the Adafruit Discord channel, and thought there are enough interesting people to make a podcast about those people and their projects.

A special shout-out to Michael Kennedy, host of the Talk Python To Me podcast. When I was considering doing this he took time out of his schedule to answer some questions for me and make some introductions. (And we’re both using Boostrap Dark for our websites, the similarity is unintentional!)

You can find out more at the newly launched website (running FastAPI of course) or follow the show on Twitter, which I recommend as that’s my platform of choice. I’ll probably drop some spoilers and other info on Twitter first.

I’ll blog some more when the teaser trailer is out or I have other news. Until then, I have a lot of work to do…

CircuitPython 2022

How cool is this: for the last few years Adafruit asks their community to share their individual goals for the CircuitPython community on the internet. From blogs posts to Twitter to YouTube videos (and more!), community members are encouraged to share their thoughts on what they want to build, features, or around the ecosystem.

I’m still fairly new to the community and my goals are much more modest than some of the others, such as the core developers. But I’ve found the community to be so welcoming and patient I thought I’d share a few thoughts.

So here goes.

A look back at 2021

2021 was the year I got into microcontrollers, CircuitPython, and hardware in general. After having bought a Circuit Playground Express in 2020 and it just sitting in a drawer, I went got into it in a big way in 2021. I purchased a rp2040 Feather, MatrixPortal M4, and an AdaBox subscription, starting with the rp2040 MacroPad. More importantly, I used them!

I learned to solder and bought a 3D printer, which makes playing with microcontrollers even more fun.

I built my MacroPad and started the MacroPad Awesome List - because MacroPads are cool. I love seeing what macros the community has come up with and then borrowing those ideas for my own MacroPad. I also created macros for my CAD program of choice, OnShape. (I’d rather learn and use FreeCad, but I really need a color blind mode).

I tackled my biggest project to date with the Sound Reactive NeoPixels Speaker Stand. This was pretty challenging and I wasted dozens of hours trying to port some sound reactive code from a digital microphone to an analog mic before breaking down and buying a digital microphone, which I just should have done in the first place! I’m very proud of the project and it so cool to look at.

Sound Reactive NeoPixels Speaker Stand

2022 Goals

I have two major goals for 2022 centered around hardware and community.

Hardware

I want to finish my Album Art project. I love that I combine my love of the physical (my record collection) with software (CircuitPython, FastAPI), and hardware (LED matrices with a MatrixPortal). I’ve made significant progress in 2022 already and the next step is integrating MQTT into the project. This is a great way to continue building on my novice Python skills as I learn FastAPI for the website that powers this (and asyncio!) as well as CircuitPython.

I’m looking forward to whatever AdaBox brings. This was my Christmas gift from my partner and I’m excited to see whatever ships next and I’m going to commit to building it right away.

Community

The Adafruit community is wonderful, especially the Discord channel. They’re welcoming to everyone and I get most of my (dumb) questions answered. I want to stay engaged and help out others where I can, if possible.

I have a goal of going on Show & Tell again once my Album Art project is done.

Lastly, reading through some of the other folks posting their 2022 thoughts, I want to reach out to Jeff Epler who shared that there might be room for further improvement to ” Continue to help people grow into the roles of reviewer and contributor. Maybe I can put my former experience in writing both documentation and articles for GNOME to use.

That’s it! A lot to look forward to in 2022. I think it’s so cool that Adafruit invites community members to share their goals for the year.

LED Matrix Progress

Now Working in CircuitPython!

When we last left our hero, he was unable to get a 8k image to load over the internet and display an image on the MatrixPortal and 64x64 LED….

I decided to take a different tack and I ordered a Matrix Bonnet for the Raspberry Pi from Digikey (Adafruit was out of stock). Let's just say that didn't work at all and I have reason to believe it’s the Bonnet after trying it on two different Raspberry Pi 2s and a Pi Zero 2.

I don’t remember what I was doing this morning, but I was back to playing with the matrices and the MatrixPortal. Danh in the Adafruit Discord, who had already helped me previously by recommending ImageMagick for my project, helped me out again. He shared a code sample making it easy to switch the MatrixPortal from read / write to read only, as only it or a computer should write to it at a time. I accidentally reset my MatrixPortal this morning and wiped it. I had some regular Python code to write the image to disk, so I tried it out on the MatrixPortal and what do you know - it worked!

I was able to initialize the network, connect to my web server, download the 64x64 image, write it to disk, and display it on the matrix.

That was a pleasant surprise, so now I’m on to the next step: converting the JPEG image from Discogs to a tiny bitmap that can be displayed in CircuitPython.

I wasn’t sure if I could use ImageMagick in Python and a couple search engine queries later I was using the Pillow library.

It’s this easy:

from PIL import Image


img = Image.open("cash2.jpg")

new_img = img.resize((64, 64))
rgb_img = new_img.convert('P')

rgb_img.save('cash2.bmp')

It takes the image, in this example the cover art to one of Johnny Cash’s American Recordings albums that I had saved as cash2.jpg locally and converted it to a tiny bitmap. I transferred it up to my web server and it works! Here is the Man in Black himself in his 8 bit glory:

Johnny Cash Album Cover

It’s exciting to have solid progress. Now I need to integrate the Pillow code into FastAPI. After that is a big chunk of work in figuring out how to get MQTT to work, but more on that later.