The Youtube Subscriber Counter
by eltallerdetd in Circuits > Arduino
1514 Views, 24 Favorites, 0 Comments
The Youtube Subscriber Counter
Hey! Today i'm gonna share with you one of my lastest quarantine projects, i'm talking about this awesome NodeMCU based Youtube Subscriber and View counter! It's a pretty simple project that can be done in an hour or less so let's get started!
Supplies
- NodeMCU
- LCD 16x2 with I2C
- Some wires
- Breadboard
- 3D Printer (This is optional)
Let's Connect Them All!
The first step is to connect all the components well. The connections are pretty simple and only require about 4 wires, so check out the attached diagram!
Generating an API Key
Now that we've all wired up it's time to write the code. But first of all we'll be using the Youtube V3 Google API to get the data so first of all go to https://console.developers.google.com/, click the 'Library' menu item on the left and search for 'Youtube Data API v3', once you got there click the 'Enable' button and you'll be ready to continue getting the API key.
Now go to the left menue again and click on 'API'S and Services' option and after that click on the 'Credentials' button. At this point you should be on the Credentials page and you should see a button to create a new API key with a + symbol and the text 'Create Credential', just click there and now click 'API Key'.
If you follow this part you should see an alphanumeric code that is your unique API key to work with the 'Youtube Data API v3' API, now copy that code and store it in some safe place.
It's important to remeber that the API key is private, so you should not share it with anyone!
You could see more info about the API Documentation here, and also i've made a Youtube Video explaining all the steps, you could find it at the end of this Instructable!
Time to Code!
Finally it's time to code! For this part you could use the Arduino IDE or other IDE or Code Editor such as Platformio, since we'll be using an NodeMCU this is totally possible.
I don't gonna explain all the code here because the tutorial will turn bored, so you could download all the commented code from Github (Click here to go to the repository!) and adapt it to your preferences, it's pretty easy to understand!
One important thing is that we'll be using some libraries, they're listed at the beginning of the code, but i'll list them here just to make it clear to search!
If you are a begginer DON'T PANIC! Some steps of the code could be difficult to understand because we're using an API and that's something pretty advanced! Remember that if you have a doubt you can comment right here or see the Youtube video that i made for the project :) Be free to ask!
Let's Bring It to Life!
This step is just about uploadind the code to the NodeMCU and see it works! Before uploading the code be sure that all the wiring is ok and just after that try it out! If everything is ok you should see the LCD glow up and the numbers appearing in the screen! Congratulations! Now let's make it cooler!
Make It Better!
This step is totally optional! If you have a 3D Printer you can print a case to make it better and use it in your desk as an amazing decoration! I made a mixed version of this model created by user matt448 on Thingverse, check it out and feel free to print it!
If you dont have a 3D Printer you can create a case too! Try to made something with wood or why not with with some paperboard, feel free to explore different options!
The Final Result!
And this is the final result, an awesome Real Time Youtube Subscriber Counter that you could use as decoration for your setup! Also this is an incredible idea for a gift, so keep that in mind! I hope you like it, remember that if you have any question you can post a comment below and i'll be there :) Thanks for reading this!
Conclusions and Video!
As i mention during the Instructable i've made a video of the building process and i've also explain all the code there! If you want you could use it to guide through the tutorial, or just see it as an extra!
I should say that the video is in Spanish because i'm not a native English speaker, so i'm sorry if my written english is to poor :( !
Thanks for reaching this part of the tutorial, have an amazing day :D