LED ON/OFF Using Blynk

 Program

/

#define BLYNK_AUTH_TOKEN "auth token"

#define BLYNK_TEMPLATE_ID "template id"

#define BLYNK_TEMPLATE_NAME "LED control "


#define BLYNK_PRINT Serial

#include <ESP8266WiFi.h>  

#include <BlynkSimpleEsp8266.h>

 


char auth[] = BLYNK_AUTH_TOKEN;

char ssid[] = "wifi name";  // Enter your Wifi Username

char pass[] = "wifi password";  // Enter your Wifi password


int ledpin = D2;  // GPIO 2 (means connect LED to D4 pin)

void setup()

{     

  Serial.begin(115200);

  Blynk.begin(auth, ssid, pass);    

  pinMode(ledpin,OUTPUT);

}


void loop()

{

  Blynk.run(); 

}

Comments

Popular posts from this blog

System Bus Types, Functions, and Features

Motherboard form factor

ESP 8266- Ultrasonic Sensor Interfacing