Skip to content

Displays YouTube channel subscriber count on a Pimoroni microdot pHAT

License

Notifications You must be signed in to change notification settings

BramDriesen/microdot-phat-youtube-subscribers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

microdot-phat-youtube-subscribers

Python script to display your YouTube Subscriber count on the Pimoroni Micro Dot pHAT.

Microdot pHAT YouTube Subscribers

Dependencies

Micro Dot pHAT library:

sudo apt-get install python3-microdotphat

or

curl https://get.pimoroni.com/microdotphat | bash

Python YouTube:

sudo pip3 install --upgrade python-youtube

Installing

Clone the project:

git clone https://github.com/BramDriesen/microdot-phat-youtube-subscribers.git

Copy the default-config file to config.py

cp default-config.py config.py

Edit the configuration file and add the YouTube channel you want to monitor, and the YouTube Statistics V3 API key.

API_KEY = "YOUR API KEY"
CHANNEL_ID = "YOUR CHANNEL ID"

NOTE: Make sure to enable the setting "Wait for network on boot" in the Raspberry Pi config screen. Use sudo raspi-config to go to the settings.

Usage

To simply run the script execute the script file.

python3 script.py

Autostart

Edit your rc.local (or use any other method as described here) file to make the script run at boot. Edit it using the command:

sudo nano /etc/rc.local

Using your cursor keys scroll to the bottom and add the following line right before the exit 0 line:

sudo python3 /home/pi/microdot-phat-youtube-subscribers/script.py & > /home/pi/youtube-subscribers.log

Now reboot your Pi and the script should automatically start.

sudo reboot

Releases

No releases published

Sponsor this project

 

Packages

No packages published

Languages