Arduino Blynk Lesson 1: LED


In this lesson, we will learn on how to control an LED using smartphone. This is a simple project designed specially for a beginner who are interested in get started with Internet of Things (IoT). 


This tutorial use :

  1. Maker UNO
  2. Cytron ESP 8266 WiFi Shield
  3. USB Micro B Cable

You can make the hardware connection based on the diagram and table below.

Figure 1 : Hardware Connection

Software Preparation.

  1. Open the Arduino IDE. Please make sure that your Arduino IDE is version 1.6.9 and above.
  2. Then, click at the on Sketch – Include Library – Manage Libraries… Search for “blynk” and install the latest version of Blynk.
  3. Next, we need to add an additional library for Blynk. Click on this link to download the library. Watch the video on how to include the library.
  4. Then we can continue to program by edit the program from the Example file of the Blynk. (File – Examples – Blynk – Boards_WiFi – ESP8266_Shield)

Sample Code

This is the sample code used for this tutorial. Try it!

Download latest Blynk library here:
Blynk is a platform with iOS and Android apps to control
Arduino, Raspberry Pi and the likes over the Internet.
You can easily build graphic interfaces for all your
projects by simply dragging and dropping widgets.
Downloads, docs, tutorials:
Sketch generator:
Blynk community:
Follow us:
Blynk library is licensed under MIT license
This example code is in public domain.
This example shows how to use ESP8266 Shield (with AT commands)
to connect your project to Blynk.
It's very tricky to get it working. Please read this article:
Change WiFi ssid, pass, and Blynk auth token to run 🙂
Feel free to apply it to any other example. It's simple!
/* Comment this out to disable prints and save space */
#define BLYNK_PRINT Serial
#include <ESP8266_Lib.h>
#include <BlynkSimpleShieldEsp8266.h>
// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "YourAuthToken";
// Your WiFi credentials.
// Set password to "" for open networks.
char ssid[] = "YourNetworkName";
char pass[] = "YourPassword";
// Hardware Serial on Mega, Leonardo, Micro...
//#define EspSerial Serial1
// or Software Serial on Uno, Nano...
#include <SoftwareSerial.h>
SoftwareSerial EspSerial(2, 3); // RX, TX
// Your ESP8266 baud rate:
#define ESP8266_BAUD 9600
ESP8266 wifi(&EspSerial);
void setup()
// Debug console
// Set ESP8266 baud rate
Blynk.begin(auth, wifi, ssid, pass);
void loop()
view raw Blynk_Lesson_1.ino hosted with ❤ by GitHub

Thank you

Thank you for reading this tutorial and we hope it helps your project development. If you have any technical inquiry, please post at Cytron Technical Forum.

2 thoughts on “Arduino Blynk Lesson 1: LED”

  1. Hahh, saya punya masalah ESP not responding, mana yang silap ah? saya sdh follow btul2 smua ni

  2. assalamualaikum dan salam sejahtera,
    sy da ikut langkah2 seperti dalam video,tetapi tidak besambung degan wifi,wifi phone da buka, kenapa yup?
    [13977] Fail to connect wifi
    mohon tunjuk ajar

Leave a Comment

Your email address will not be published.

Share this Tutorial

Share on facebook
Share on whatsapp
Share on email
Share on print
Share on twitter
Share on pinterest
Share on facebook
Share on whatsapp
Share on email
Share on print
Share on twitter
Share on pinterest

Latest Tutorial

DIY Interactive Robot Using REKA:BIT With Micro:bit
BLTouch Installation for Ender 3 with 32-bit V4.2.2 Board
Pick and Send Random Meal’s Option and Locations through Telegram Bot Using Grove WiFi 8266 on micro:bit
DIY Automated Vacuum Cleaner Using REKA:BIT With Micro:bit
Rainbow Spark in Mini House using Maker Uno.
Tutorials of Cytron Technologies Scroll to Top