Professional Documents
Culture Documents
com
This project demonstrating how to control light in our room remotely. So here we
controlling led with WiFi via Blynk. Blynk is a Platform with iOS and Android apps to
control Arduino, Raspberry Pi, and the likes over the Internet. It’s a digital dashboard
where you can build a graphic interface for your project by simply dragging and
dropping widgets.
The ‘Light controlling of ESP32 by WiFi ‘ project uses the ESP32 Development Board
will be used to blink an LED at a specific timed interval, continuously. It is the required
basic tutorial for any microcontroller board. And connect an LED to any of GPIO pin of
ESP32
https://openlabpro.com/guide/wifi-controlled-light-using-esp32/ 1/6
25/11/2021 14:10 WiFi controlled Light using ESP32 - openlabpro.com
Components Required
ESP32 development board
5mm LED
1KΩ Resistor
3 pieces of jumper wires
Breadboard
Smartphone
Circuit Diagram
https://openlabpro.com/guide/wifi-controlled-light-using-esp32/ 2/6
25/11/2021 14:10 WiFi controlled Light using ESP32 - openlabpro.com
Connect the positive pin (anode) of the LED, that indicated as the rounded edge of the
LED to pin IO2 on the ESP32.
Connect the negative pin (cathode) of the LED, indicated as the flat edge of the LED to a
1KΩ resistor.
And Connect the free end of the resistor to Ground
Blynk setup
Blynk is a Platform with iOS and Android apps to control Arduino, Raspberry Pi and
the likes over the Internet. It’s a digital dashboard where you can build a graphic
interface for your project by simply dragging and dropping widgets.
Blynk setup
Code Snippet
#define BLYNK_PRINT Serial
int pin = 2;
#include <WiFi.h>
#include <WiFiClient.h>
#include <BlynkSimpleEsp32.h>
https://openlabpro.com/guide/wifi-controlled-light-using-esp32/ 4/6
25/11/2021 14:10 WiFi controlled Light using ESP32 - openlabpro.com
void setup() {
pinMode(pin, OUTPUT);
pinMode(pin, HIGH);
Serial.begin(115200);
delay(10);
Serial.print("Connecting to ");
Serial.println(ssid);
WiFi.begin(ssid, pass);
int wifi_ctr = 0;
delay(500);
Serial.print(".");
Serial.println("WiFi connected");
void loop(){
Blynk.run();
https://openlabpro.com/guide/wifi-controlled-light-using-esp32/ 5/6
25/11/2021 14:10 WiFi controlled Light using ESP32 - openlabpro.com
Copyright © 2012 - 2019 Etiq Technologies, All Rights Reserved | Terms of Service | Privacy Policy | Legal Notices
https://openlabpro.com/guide/wifi-controlled-light-using-esp32/ 6/6