66d4523741098e13a4c290f7 WiFi Module ESP8266
66d4523741098e13a4c290f7 WiFi Module ESP8266
Hardware Required
Arduino or Genuino Board
ESP8266 Wifi module
Breadboard
LED
Wires
Pushbutton
Resistor
Theory
The Arduino Uno WiFi is an Arduino Uno with an integrated WiFi
module. The board is based on the ATmega328P with an
ESP8266WiFi Module integrated. The ESP8266WiFi Module is a self
contained SoC with integrated TCP/IP protocol stack that can give
access to your WiFi network (or the device can act as an access
point). One useful feature of Uno WiFi is support for OTA (over-the-
air) programming, either for transfer of Arduino sketches or WiFi
firmware.
Code
Board NodeMCU 1.0(ESP-12E Module)
#define BLYNK_PRINT Serial
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
#include <SoftwareSerial.h>
#include <SimpleTimer.h>
#define led D2
SimpleTimer timer;
void setup()
{
Serial.begin(9600);
Blynk.begin(auth, ssid, pass);
pinMode(led, OUTPUT);
timer.setInterval(1000L, myTimerEvent);
}
void loop()
{
if (Serial.available() == 0 )
{
Blynk.run();
timer.run(); // Initiates BlynkTimer
}
}
Demonstrations
(Demonstrations with photos of experiments)
Before coding the project, we need to be able to connect 2 devices to Arduino IDE in order to
upload codes on the devices.
1. We need to install CH340 driver in order to connect to ESP8266. Then download ESP8266 board
(Tools -> Board -> Boards manager -> Search for “esp8266” by ESP8266 community)
2. We use Blynk to support our project. So that we have to install Blynk library (Sketch -> Include
library -> Manage library -> Search for “Blynk” by Volodymyr Shymanskyy) .
3. Adding crucial library:
SimpleTimer.h(Sketch -> Include library -> ADD .ZIP library...)
ESP8266WiFi.h (File -> Preferences -> Additional Boards Manager URLs: -> add this link)
References
https://docs.arduino.cc/retired/getting-started-guides/
ArduinoUnoWiFi
https://www.youtube.com/watch?v=lp93f4tFqh4&t=924s
https://www.youtube.com/watch?v=MM9Fj6bwHLk
https://www.youtube.com/watch?v=vDm1zhqS-wE