Inspiration
It all started when I accidentally stepped on my Raspberry Pi. I wanted to make sure it wasn't broken so I booted it up and it was working fine. Also on my desk was a 7-segment display I wanted to use for a digital clock that would slap me awake. I thought it would be cool to use the display as an output for the Raspberry Pi since I've only ever used it headless and running for random project ideas. My first idea was to make a real-time YouTube subscriber counter (I don't actually have any videos but I thought the idea was neat)
What it does
Does whatever you need it to, babey. It gets the subscriber count of ANY YouTube channel and displays it on a stunning, elegant, breathtaking, Ultra-HD 7 segment display. It works by calling the YouTube Data API to periodically ask for the subscriber count and then I wrote binary outputs to display numbers 0-9 and the symbols k and m (I actually couldn't make the k or m shape so instead its H and Π lol)
How we built it
I used a Raspberry Pi 4b and its GPIO pins to control the display. Once the call to the API was made and the subscriber count was obtained, I made a system to convert it into the YouTube subscriber format (3 sig-figs + k or m if enough subs) and flash it repeatedly onto the display to give the illusion of continuous output
Challenges we ran into
I had trouble getting the decimal places onto the display (e.g for 6.51k subs) because I had a hard-coded dictionary for the symbol binary to be displayed onto the GPIO pins. I got it working by simply writing to the decimal pin if needed to (length of sub count string modulus 3 would dictate where the decimal should go)
Accomplishments that we're proud of
It actually works for any YouTube channel, so anyone can use it as long as they have the channel's user handle (shows up under the channel name when you open their profile)
What we learned
Basics of YouTube Data API How to use lgpio to set gpio pins to output
What's next for MakeSureToLikeAndSubSeg
Move to a cheaper Raspberry Pi (like the Zero W because its also smaller but keeps wifi)
Use a shift register for easier writing to the pins (I didn't have one on me). I also want to make a simple PCB for a more permanent solution than the breadboard
I want to make a YouTube video outside of the hackathon submission detailing how I made the project (so you should sub to https://www.youtube.com/@THERATSMORE, for testing purposes of course)
Built With
- googleapiclient
- hopes&dreams
- python
Log in or sign up for Devpost to join the conversation.