IOT digital clock with Instagram stats using ESP8266

Having a display in any electronics project makes it more interesting as you can visualize data with it. With that in mind I thought it’d be useful if I have a small display, connected to the Internet in my work space. The plan is simple to connect my ESP module to Internet to fetch the Real time and Instagram stats then display them on my OLED display. This IOT enabled project makes a great inclusion to your workbench if you are an avid Instagram user.



I wanted this project to be small and compact size so I have gone with this 0.96″ OLED display module. It has a resolution of 128×64 pixel. It uses I2C communication protocol, so less wiring mess. We just need 4 wires to control it two wire for the I2C bus(SDA & SCL) and VCC and GND to power it up. And can show all sorts of alpha-numerical and graphical data. Perfect for my application.


Now to connect to Internet and control the display I will be using popular ESP8266 microcontroller. It has WiFi built-in. So we can connect to the Internet easily.


We will also need a Li-Ion battery if we want to make it portable. But it’s totally optional and you can ignore them and use a regular DC power supply adapter to power this project.


For testing purpose we use ESP8266 based NodeMCU board. Hookup everything on a breadboard according to this diagram.

Some of the displays may have the GND and VCC power pins swapped around. Be sure to check your display and connect the pins accordingly.

  1. VCC – NodeMCU 3.3V
  2. GND – NodeMCU GND
  3. SCL – NodeMCU D1 / GPIO5
  4. SDA – NodeMCU D2 / GPIO4


Many libraries are available to control these displays. I find the Adafruit library very easy to understand and use in projects. I am going to use the AdaFruit library in this tutorial. You’ll need to install “adafruit_GFX.h” library and “adafruit_SSD1306.h” library. To download and install the library to your Arduino IDE, go to “Library manager” in your IDE and search for “adafruit_SSD1306” and “adafruit_gfx”

Select the latest version and hit the Install button. Once installed you can use these libraries in your program. Alternatively you can download both of these libraries from Github ( SSD1306 and GFX ). If you are downloading libraries from Github, copy the Adafruit_SSD1306 master folder from the downloaded zipped file into the Arduino libraries folder. This folder is usually found at Documents > Arduino > libraries on Windows systems.


I wanted to make a Digital clock that can also display my current Instagram followers count.We will use NTP Server to get the real time and Instastat Library by Brian Lough to get the Instagram Followers count. You can download this Instastat library from here. Install the above downloaded library to the Arduino libraries folder.


Now its time to upload the code for this project in your NodeMCU project. You can download this code from my GitHub page.

You will need to modify three things in the code.

  1. Your WiFi username in the line 36
  2. Your WiFi password in the line 37
  3. Instagram Username goes to the line 27

Upload the above code to your NodeMCU after making the corresponding changes. Now you should see that the current time and Follower count are showing on the display.


I have designed a PCB for this project to hook up the display in a single board to make it compact. You can download the Gerber files for this PCB design below. I have used ESP12F for this project and SMD components to reduce space. I solder everything on the PCB and connect a small battery as well.

IOT Display Gerber Files
IOT Display Gerber Files
Version: 1
57.8 KB

Hope this Project guide was useful to you. If you have any queries do leave them in the comment box below also do not forget to share your feedback about this project. This project design and code was built by our team member Sayantan Pal.

Ask your query

1 Comment threads
1 Thread replies
Most reacted comment
Hottest comment thread
2 Comment authors
Frank Donaldben johnson Recent comment authors
newest oldest most voted
Notify of
ben johnson
ben johnson

hi! amazing project which i have just made one myself and was working great but about 8 hours later the counter just say 0 even after i re upload the code.. do you know why?


Frank Donald

Hi Ben,
This code is built based on Instastat library by Brian Lough unfortunately it has stopped working. Perhaps Instagram changed the way it handles these request. We believe they are working to fix this will let you know once any solution is being announced.