Home Automation with esp32

circuit diagram

pin connection 

  1. gnd -- Gnd
  2. vcc -- 5v
  3. in1 --gpio21
  4. in2 --gpio22
  5. in3 --gpio25
  6. in4 --gpio26 
code:

#define BLYNK_PRINT Serial
#include <WiFi.h>
#include <WiFiClient.h>
#include <BlynkSimpleEsp32.h>

char auth[] = "blynk auth";

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

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

  Blynk.begin(auth, ssid, pass);
}

void loop()
{
  Blynk.run();
}


youtube tutorial:


No comments:

Post a Comment

Timer control led using esp32

...