“DIY physical YouTube subscriber counter using a D1 Mini microcontroller and a seven-segment display.
If you’re anything like me, watching your YouTube channel grow is an exhilarating experience. There’s something special about knowing that people from around the world are tuning in to watch your content. But as my channel Mellow_Labs began to gain traction, I realized I needed a fun and tangible way to keep track of my subscriber count, something that would keep me grounded and motivated.
The solution? A YouTube subscriber counter! And I’m not talking about a digital counter you check on your phone. I’m talking about a physical, tangible counter that you can put on your desk, watch the numbers roll up, and feel that little burst of happiness each time someone new subscribes.
Choosing the Display
The first step in this journey was deciding on the type of display I wanted. I considered a wide range of options: split flip, flip dot, LED matrix, and even Nixie tubes. Each of these displays has its own unique charm, but in the end, I settled for an 8-digit seven-segment display. Why? Because it’s low power and quiet, which makes it ideal for a desk accessory.
The Heart of the Project: D1 Mini
At the heart of this project is the D1 Mini, a microcontroller I’ve used so much, I’ve literally started a fan club for it. Its compact size and versatility make it a perfect fit for this project.
Connecting the Dots
With my D1 Mini and seven-segment display in hand, it was time to connect the two. This was done using some simple jumper wires, which allowed the microcontroller and display to communicate.
Let’s Get Coding!
Next came the fun part – programming! To control the display, I used the MicroPython MAX7219 library developed by Andrew Mullane. I also wrote some custom code to pull the subscriber count from the YouTube API.
One little challenge I encountered was that the screen would flicker every time the code refreshed. To solve this, I added a check to ensure the number changed before updating the screen. This way, the screen stays stable and only changes when there’s a new subscriber.”