Inventor Niv
Published © CC BY-NC

ESP8266 - Beginner Tutorial + Project

An ultimate tutorial for beginners on how to connect and use an ESP8266 via Arduino and program it to blink an LED using the Blynk app.

BeginnerProtip16,421
ESP8266 - Beginner Tutorial + Project

Things used in this project

Hardware components

Arduino UNO & Genuino UNO
Arduino UNO & Genuino UNO
×1
ESP8266 ESP-01
Espressif ESP8266 ESP-01
×1

Software apps and online services

Blynk
Blynk
Arduino IDE
Arduino IDE

Story

Read more

Code

Uploading the program

Arduino
Copy the code in to your Arduino IDE and upload it. You have to enter your auth code, Wifi name, and wifi password in the corresponding variable declaration section of the code.
#define BLYNK_PRINT Serial


#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>

// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "your auth token code from blynk app";

// Your WiFi credentials.
// Set password to "" for open networks.
char ssid[] = "your wifi name";
char pass[] = "your wifi password";

void setup()
{
  // Debug console
  Serial.begin(9600);

  Blynk.begin(auth, ssid, pass);
  // You can also specify server:
  //Blynk.begin(auth, ssid, pass, "blynk-cloud.com", 80);
  //Blynk.begin(auth, ssid, pass, IPAddress(192,168,1,100), 8080);
}

void loop()
{
  Blynk.run();
  // You can inject your own code or combine it with other sketches.
  // Check other examples on how to communicate with Blynk. Remember
  // to avoid delay() function!
}

Credits

Inventor Niv

Inventor Niv

1 project • 11 followers
A passionate Electronics and communication engineering student who loves to make & invent new stuffs. Good at programing & hardware field.

Comments

Add projectSign up / Login