YouTube Subscriber Counter (Under 10K)




About: Making and sharing are my two biggest passions! In total I've published hundreds of tutorials about everything from microcontrollers to knitting. I'm a New York City motorcyclist and unrepentant dog mom. My ...

I was inspired by the Play Button awards YouTube sends out for subscriber milestones and whipped up a simple circuit using an ESP8266 wifi board and seven segment display to show off my realtime subscriber count. This is a great IoT beginner project, with just a little soldering and a code personalization required to make it work for your own account. I made a version 2 that supports more than 10K subscribers, too.

Before attempting this project, you should be generally familiar with uploading new programs to your Arduino board and installing code libraries, both of which you can learn for free in my Arduino Class, though you really don't have to understand any of the actual Arduino code to get this project running.

For this project, you will need the following materials:

and the following tools:

Required software libraries:

Unique data required:

As an alternative to the Feather Huzzah, you can also use your favorite ESP8266 microcontroller board, some of which require an FTDI cable to upload new programs. Use the standard 7-segment backpack rather than the FeatherWing version.

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: Assemble Circuit

Follow the official assembly instructions for the Feather Huzzah using female headers (or stacking headers, though you'd have to cut the long legs off) Likewise follow the assembly instructions for your seven-segment FeatherWing display.

Before you dive into the code for this project, you should first make sure you've got your Arduino software set up properly to program the board you are using, which in my case involves installing the SiLabs USB driver and installing ESP8266 board support (explained in more detail in the Feather Huzzah tutorial):

  • Go to Arduino-> Preferences...
  • Look for a text field labeled "Additional Boards Manager URLs:" and paste the following URL into the field (separate multiple URLs with commas if applicable):
    <a href=""></a>
  • Click OK
  • Go to Tools->Board-> Boards Manager...
  • Search for ESP8266 and click the Install button in the box "esp8266 by ESP8266 Community" when it shows up

Huzzah ESP8266 boards have an LED connected to pin 0, and you can find a sample blink sketch by navigating to File->Examples->ESP8266->Blink, or copy it from here:

void setup() {
  pinMode(0, OUTPUT);
void loop() {
  digitalWrite(0, HIGH);
  digitalWrite(0, LOW);

Plug in your USB cable to the board and configure your settings under the Tools menu as follows:

  • Board: Adafruit Huzzah ESP8266
  • CPU Frequency: 80MHz
  • Flash Size: 4M (3M SPIFFS)
  • Upload Speed: 115200
  • Port: whichever one ends in SLAB_USBtoUART (Mac) or COMx (Windows)

Click the Upload button to send the program to your board. This will take several seconds (longer than you are used to with Arduino Uno). After complete, the onboard LED should start blinking.

While the Feather Huzzah auto-detects when it's being sent a new program, other ESP8266 boards may require a sequence of button presses to get into bootloader mode.

Do not proceed until you've successfully uploaded a blink test program to your board.

Step 2: Customize Code & Program Board

For this project, you will need the following Arduino Libraries. Easily search and install each one using the Library Manager by navigating to Sketch->Include Library->Manage Libraries... or download from Github and install the old fashioned way:

Download the code attached to this step and open the file "YouTubeSubscriberCounter.ino" in the Arduino IDE. Customize the variables (shown highlighted in teal in the Arduino screenshot above):

Upload the customized code to your board.

Step 3: Print Paper Template

Download the paper template attached to this step and print it out (designed for 8.5x11" paper, and my shadow box capacity is 4x6"). Cut along the lines to separate the two pieces. The graphic goes right behind the glass, and the other part is for easy placement of the circuit.

Step 4: Put It All Together

Clean the inside of your glass to be sure its free of dust, cat hair, and other contaminates. Glass is sharp, so be careful handling it.

Place the graphic template face down against the glass, then stack the shadow box separator inside. Glue the other template piece to a 4x6 piece of illustration board or scrap cardboard using a glue stick, then tape the circuit sandwich in place over the template rectangle. You could avoid the glue-up step by printing the template on stiff paper.

Cut away a notch in both backing boards to accommodate for the USB cable, and slot the back in place. Plug in and enjoy! Of if you're like me, disassemble several more times to get the notch just right, the dust out of the glass (again), and install a small shim under the USB plug to help the seven-segment display press flush against the paper/glass (otherwise the numbers are blurry).

Step 5: Enjoy!

Display your custom Play Button with pride!

You may have noticed the display only supports subscriber counts up to 10,000. If you're popular enough to have that problem, add another four-digit display to yours, soldering a jumper to change the I2C address of the second one.

I'd be delighted to see your version of this project in the comments. Let me know if you have any questions as well. Thanks for reading!

If you like this project, you may be interested in the other IoT projects in the series:

Microcontroller Contest 2017

Participated in the
Microcontroller Contest 2017

6 People Made This Project!


  • Made with Math Contest

    Made with Math Contest
  • Multi-Discipline Contest

    Multi-Discipline Contest
  • Robotics Contest

    Robotics Contest

46 Discussions


Question 7 months ago

Any suggestions for how I might go about tweaking the code in order to have it play a sound when a sub is gained/lost? I know how to implement the speaker code, but not sure on tracking whether the number has changed or not.

4 answers

Reply 5 months ago

Hi, Im very interesting about this. I wanna play a sound like iap128 said. May you make the tutorial? Im newbie about this, hope you can build and share. Thanks in Advance. Im really happy if you do that.


Reply 5 months ago

It was actually really easy to do. I just made another variable and set that to 0, calling it previousSubs. Then in the loop a simple if statement of whether subs is greater or less than the previous value worked. In those if statements you can add code to make the speaker play a sound. Of course, outside of the if statements you'll want to set the previous subs value to current subs value.

Screen Shot 2019-05-11 at 4.23.21 PM.png

Reply 5 months ago

Hi thanks for update, could you share a full code, please? Or it will good if you share a full tutorial in Instructables. TIA


Question 9 months ago

Ok thank you Becky for responding. Quick recap from my problem.I think i get the wiring right, I can get and connect to the WiFi. However the Arduino can't get the data from the Youtube API. The API works, I see on my API stats some responses and with an API Checker I get my Youtube Stats. See pictures below

Thanks a lot! :D

1 answer

Answer 9 months ago

Yesss I solved the problem! I had the newest firmware on the arduino and however by uploading the older version it worked immedialety! :D

Consider downloading the older version


9 months ago

Becky - Thank you for posting this project- I purchased the components via your links - soldered everything together and successfully installed all of the drivers, libraries etc... My 6 year old son who is an "aspiring YouTube content creator" wanted this for Christmas - we were so excited as the code was uploading to the board only to be severely disappointed in our failure when the display shows like the image below. He has 21 subscribers.... I recoded the board to my YouTube account/API and I have 3 subscribers (no I am not an aspiring YouTube star haha) --- the display didn't change at all.... any ideas where I should start in decoding what I may have done wrong? Solder joints are clean, boards can only assemble one way... any ideas?

1 reply

Reply 9 months ago

I figured it out.... after creating the YouTube API, I didn't "enable" it. Thanks again - this was an awesome project!.


1 year ago

Hello, I have a question, the code is never entering into if loop, what am I possibly doing wrong?

1 reply

Reply 1 year ago

it stops after displaying the ip address :(


1 year ago

Is it possible to have multiple wifi networks that the board can connect to?


1 year ago

Really inspiring, Thank You! Will start to make one for Instagram follower count for our cafe. Probably need some help with coding :D


2 years ago

Hello again!

for some reason, I am not getting any ports called ....SLAB_USBtoUART.

all I have is a bluetooth one, and /dev/cu.MALS or /dev/cu.SOC

what should I do? I can't upload anything to the board :(

It is giving me the following error message:

warning: espcomm_sync failed

error: espcomm_open failed

error: espcomm_upload_mem failed

error: espcomm_upload_mem failed

Thanks for the help!!!


2 replies

Reply 2 years ago

are you Dutch Bob?

want dan kan ik je op weg helpen, in hoe Arduino en librairies enz te gebruiken..

en hoe je het moet instellen,



2 years ago


I am having the same problem as Wannaduino. Unfortunately, I just decided to try to build this project out of curiosity. I have absolutely zero coding experience, and this is my first Arduino ever! If anyone figured out how to get this project working on a 7-segment LED matrix backpack with only 4 pins (besides the pins to connect the actual LED display), I would really really really appreciate any help I can get. I have not started doing anything to my Arduino yet, as I don't want to mess anything up before even getting started.

Also, how can I connect the LED display to the Adafruit feather HUZZAH with ESP8266? The pins don't match up, since the LED backpack does not have the pins in the same place anymore....

I don't have a lot of money, since I am just a student, and so I really do not want to have spent 25 dollars for nothing. If anyone could help me out, you would really make my day :).

Thank you so much!

3 replies

Reply 2 years ago

One really common mistake Arduino beginners make is to bite off more than they can chew-- if this is your first Arduino project, you should start simpler with tutorials you can follow exactly, such as my free Arduino class: (and examples that use your exact display) before you should expect to be able to adapt examples for different hardware.


Reply 2 years ago

True :)

I am a very ambitious person, so when I see something I think is interesting, I go for it. How long do you think it will take me to figure all of this out? As I am in the process of moving to a different country, my first college, and getting my driver's license (which is really to complicated here in Europe :( ), I really have to be on top of my schedule.

Is the problem I am having something you would consider an "easy fix"?

Did WannaDuino figure out how to get his to work? Because he said he has been trying to code arduino's for a year now, which, to be honest, worries me a little bit regarding my chances of success.

I will definitely look into your course, as you have obviously put a lot of time into creating it, and I think I am your prime demographic for it :)

Thanks so much for the help! Any extra help will, of course, be extremely appreciated, as well.

Have a great day!


Reply 2 years ago

Thanx bro, for reading my comments, yep it is STILL not working,

wanna know why? because i did NOT GET ANY HELP. that`s why, so don`t worrie. they will help you,

because my messages where stuck on the instructable server, they never came to Becky, and then after a few messages NOT comming tru, i got madder and madder and my messages where getting angyer too.

And yep, on that time they got tru to here, and thats why i still untill today HAVE NOT got any answer of her.

But, there is a guy here, witnesmenow, he made the code, and he told me he would help me, HE DID in his vissues way, he played with me, he wanted me to learn it myself.

what would you do, if somebody says to you when you have no F16 jet experiance, and never flown, and that you need to do it yourself..

i tryed it for days, and he just left me.

understand my anger now..

instructables server was the fault of me having still not a working display.

what an amazing story eehh. and i got the mails from mikesaures and abother instuctebles employee to back my story up.

so BECKY ask them. this complete mess was NOT my fault from the beginning,

what would you do?

i just want it to work dudes.