Diy YouTube Live Subscriber Counter Using Node MCU (ESP8266)& Nokia 5110 LCD – Full IoT Project Guide

 



In the digital age, YouTube has become one of the most popular platforms for content creators worldwide. If you are a creator or just a tech enthusiast, displaying your live subscriber count can be both exciting and motivating. In this tutorial, we will build a YouTube Live Subscriber Counter using NodeMCU (ESP8266) and a Nokia 5110 LCD display, which updates your subscriber count in real time.

This project is not only functional but also visually appealing, perfect for your desk, studio, or YouTube setup. It combines IoT, electronics, and programming, making it an ideal project for Arduino enthusiasts, ESP8266 hobbyists, and DIY makers.

By the end of this guide, you will have a fully working subscriber counter that fetches live data from YouTube using the YouTube Data API v3, displays it on a retro LCD, and can be customized with optional features like LED indicators and 3D-printed cases.


Components Needed

Before we start, here is the complete list of components required for this project:

  • NodeMCU ESP8266 – The main controller that connects to Wi-Fi and fetches data.

  • Nokia 5110 LCD display (SPI) – To display the subscriber count in a retro style.

  • Jumper wires – For connections.

  • USB cable – For programming and power supply.

  • Optional breadboard – For prototyping.

  • Optional LED / Buzzer – For subscriber milestone notifications.

Tip: Make sure your Nokia 5110 LCD is compatible with 3.3V logic since NodeMCU works on 3.3V.


Circuit Connections

NodeMCU → Nokia 5110 LCD

Nokia 5110 PinNodeMCU Pin
RSTD4 (GPIO2)
CE / CSD3 (GPIO0)
DCD2 (GPIO4)
DIND7 (GPIO13)
CLKD5 (GPIO14)
VCC3.3V
BL3.3V or GND
GNDGND

Note: BL pin controls the backlight. Connect it to 3.3V for constant light or GND if you want it off.


Step 1: Setup YouTube API

To fetch live subscriber data, you need an API key from Google. Follow these steps:

  1. Go to Google Cloud Console and create a new project.

  2. Enable YouTube Data API v3 for your project.

  3. Create an API Key. Copy this key; it will be used in your NodeMCU code.

  4. Obtain your Channel ID:

    • Open your YouTube channel → Right-click → “View Page Source” → Search for "channelId" → Copy the string (e.g., UCxxxx123456789).


Step 2: Arduino IDE Setup

  1. Install Arduino IDE (if not already installed).

  2. Install ESP8266 Board Package:

    • Go to File → Preferences → Additional Board Manager URLs → add:

      http://arduino.esp8266.com/stable/package_esp8266com_index.json
    • Open Tools → Board → Board Manager, search for ESP8266, and install.

  3. Install required libraries via Library Manager:

    • Adafruit GFX Library

    • Adafruit PCD8544 Nokia 5110 LCD

    • ArduinoJson


Step 3: Arduino Code for NodeMCU

#include <ESP8266WiFi.h> #include <ESP8266HTTPClient.h> #include <ArduinoJson.h> #include <Adafruit_GFX.h> #include <Adafruit_PCD8544.h> // Wi-Fi Credentials const char* ssid = "YOUR_WIFI_NAME"; const char* password = "YOUR_WIFI_PASSWORD"; // YouTube API Credentials String API_KEY = "YOUR_YOUTUBE_API_KEY"; String CHANNEL_ID = "YOUR_CHANNEL_ID"; // Nokia 5110 Setup (RST, CE, DC, DIN, CLK) Adafruit_PCD8544 display = Adafruit_PCD8544(D4, D3, D2, D7, D5); void setup() { Serial.begin(115200); display.begin(); display.setContrast(50); display.clearDisplay(); display.setTextColor(BLACK); // Connect Wi-Fi WiFi.begin(ssid, password); display.setCursor(0,0); display.println("Connecting WiFi..."); display.display(); while (WiFi.status() != WL_CONNECTED) { delay(500); Serial.print("."); } display.clearDisplay(); display.setCursor(0,0); display.println("WiFi Connected!"); display.display(); delay(1000); } void loop() { if(WiFi.status() == WL_CONNECTED){ HTTPClient http; String url = "https://www.googleapis.com/youtube/v3/channels?part=statistics&id=" + CHANNEL_ID + "&key=" + API_KEY; http.begin(url); int httpCode = http.GET(); if(httpCode == 200){ String payload = http.getString(); DynamicJsonDocument doc(1024); deserializeJson(doc, payload); String subs = doc["items"][0]["statistics"]["subscriberCount"]; Serial.println("Subscribers: " + subs); // Display on Nokia 5110 display.clearDisplay(); display.setTextSize(1); display.setCursor(0,0); display.println("YouTube Live Subs"); display.setTextSize(2); display.setCursor(0,20); display.println(subs); display.display(); } else { Serial.println("HTTP Error"); } http.end(); } delay(30000); // Update every 30 seconds }

Step 4: Features of the Project

  • Real-time subscriber count display

  • Compact retro LCD screen

  • Easy to build & customize

  • Optional LED/Buzzer for subscriber milestones

  • Fully programmable using Arduino IDE

  • Wi-Fi enabled via NodeMCU ESP8266


Step 5: Optional Upgrades

  1. Scrolling channel name on LCD if too long.

  2. LED animation when subscriber count increases.

  3. Mount the LCD in a 3D-printed YouTube Play Button case.

  4. Upgrade to TFT display for colorful display & animation.

  5. Reduce update interval to 15 seconds but ensure you don’t exceed API quota.


Step 6: Troubleshooting Tips

  • If the LCD is blank: check contrast (display.setContrast()).

  • Ensure NodeMCU is connected to Wi-Fi before fetching data.

  • Make sure API Key and Channel ID are correct.

  • Use Serial Monitor to debug HTTP requests.

  • If ArduinoJson fails, increase DynamicJsonDocument size from 1024 → 2048.


Conclusion

This NodeMCU + Nokia 5110 LCD YouTube Live Subscriber Counter is an exciting DIY IoT project that combines electronics, programming, and web API usage.

It’s perfect for YouTubers, tech enthusiasts, and makers who want to display live subscriber counts on their desk or in their studio. With optional upgrades like LED alerts, scrolling text, and custom casing, this project can also become a professional-looking gadget.

Start building today, and make your desk or studio more interactive and tech


#NodeMCU ESP8266 project

#Nokia 5110 LCD Arduino project

#Live subscriber display

#IoT desk gadget

#Arduino IoT project


    Comments