Skip to content

RATSMORE/MakeSureToLikeAndSubSeg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 

Repository files navigation

MakeSureToLikeAndSubSeg

What?

I'm glad you asked! This is a YouTube subscriber counter based on a 4-digit 7-segment display. The python script periodically calls the Youtube API v3 to get the number of public subscribers a channel with a given user handle has, and outputs the value onto the display.

How do I use it?

Hardware

The circuit consists of connection between the display and Pi for any digit pins (D1-D4) and a resistor for the segment pins (A-G + Decimal) Below is an image from SparkFun of the Raspberry Pi pins and an image from software particles of the pins of the 7 segment display image image

The following connections were used (NOTE: I used a 5641AS module, which turns on a digit by setting its pin low and segments high. The alternative is a 5641BS module, which has it reversed. This can be changed in code by taking the complement of the dictionary containing the binary for each symbol)

Raspberry Pi Pins Display Pin Resistor needed?
GPIO17 D1 No
GPIO27 D2 No
GPIO22 D3 No
GPIO5 D4 No
GPIO6 A Yes
GPIO13 B Yes
GPIO26 C Yes
GPIO23 D Yes
GPIO24 E Yes
GPIO25 F Yes
GPIO12 G Yes
GPIO16 Decimal Yes

The finished circuit will look like the following (but probably a lot nicer lol): image

Software

To use this program, you need the dependencies listed on requirements.txt, the python script MakeSureToLikeAndSubSeg.py, and the configuration file cfg.txt

While in a virtual environment (made with python3 -m venv <venv_name> and entered with source <venv_name>/bin/activate), the dependencies can be installed with pip install -r requirements.txt

The cfg.txt file simply has your key for the YouTube Data API in the first line, and the user handle (seen below a channel's username when you open their page) in the second line. A key for the API can be generated by following the instructions here

Once the environment is set up and the configuration file is set, the program can be run using the following python3 MakeSureToLikeAndSubSeg.py

About

7-segment youtube subscriber counter

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages