0% found this document useful (0 votes)
12 views12 pages

EXP10

This document contains code for an ESP8266 microcontroller that uses the Blynk platform to control three LEDs connected to pins D5, D6, and D7. It defines the necessary Blynk template and authentication details, sets up the WiFi connection, and includes functions to handle LED control through virtual pins V0, V1, and V2. The main loop runs Blynk and a timer to maintain the connection and respond to commands.

Uploaded by

kssanjana123
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views12 pages

EXP10

This document contains code for an ESP8266 microcontroller that uses the Blynk platform to control three LEDs connected to pins D5, D6, and D7. It defines the necessary Blynk template and authentication details, sets up the WiFi connection, and includes functions to handle LED control through virtual pins V0, V1, and V2. The main loop runs Blynk and a timer to maintain the connection and respond to commands.

Uploaded by

kssanjana123
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

#define BLYNK_TEMPLATE_ID "TMPL3XY272VMV"

#define BLYNK_TEMPLATE_NAME "led"

#define BLYNK_DEVICE_NAME "led"

#define BLYNK_AUTH_TOKEN "drBMSBM_dRwnwlIAlqoce6MFTWQkgxwv"

#define BLYNK_PRINT Serial

#include <ESP8266WiFi.h>

#include <BlynkSimpleEsp8266.h>

#define LEDPIN0 D5

#define LEDPIN1 D6

#define LEDPIN2 D7

char auth[] = "drBMSBM_dRwnwlIAlqoce6MFTWQkgxwv";

char ssid[] = "Shri";

char pass[] = "shri5868";

BlynkTimer timer;

BLYNK_WRITE(V0)

int pinValue0 = param.asInt();

digitalWrite(LEDPIN0,pinValue0);

BLYNK_WRITE(V1)

int pinValue1 = param.asInt();

digitalWrite(LEDPIN1,pinValue1);
}

BLYNK_WRITE(V2)

int pinValue2 = param.asInt();

digitalWrite(LEDPIN2,pinValue2);

void setup()

{ {

pinMode(D5,OUTPUT);

pinMode(D6,OUTPUT);

pinMode(D7,OUTPUT);

// Debug console

Serial.begin(115200);

Blynk.begin(auth, ssid, pass);

void loop()

Blynk.run();

timer.run();
#define BLYNK_TEMPLATE_ID "TMPL3XY272VMV"

#define BLYNK_TEMPLATE_NAME "led"

#define BLYNK_DEVICE_NAME "led"

#define BLYNK_AUTH_TOKEN "drBMSBM_dRwnwlIAlqoce6MFTWQkgxwv"

#define BLYNK_PRINT Serial

#include <ESP8266WiFi.h>

#include <BlynkSimpleEsp8266.h>

#define LEDPIN0 D5

#define LEDPIN1 D6

#define LEDPIN2 D7

char auth[] = "drBMSBM_dRwnwlIAlqoce6MFTWQkgxwv";

char ssid[] = "Shri";

char pass[] = "shri5868";

BlynkTimer timer;

BLYNK_WRITE(V0)

int pinValue0 = param.asInt();

digitalWrite(LEDPIN0,pinValue0);

BLYNK_WRITE(V1)

int pinValue1 = param.asInt();

digitalWrite(LEDPIN1,pinValue1);
}

BLYNK_WRITE(V2)

int pinValue2 = param.asInt();

digitalWrite(LEDPIN2,pinValue2);

void setup()

{ {

pinMode(D5,OUTPUT);

pinMode(D6,OUTPUT);

pinMode(D7,OUTPUT);

// Debug console

Serial.begin(115200);

Blynk.begin(auth, ssid, pass);

void loop()

Blynk.run();

timer.run();
#define BLYNK_TEMPLATE_ID "TMPL3XY272VMV"

#define BLYNK_TEMPLATE_NAME "led"

#define BLYNK_DEVICE_NAME "led"

#define BLYNK_AUTH_TOKEN "drBMSBM_dRwnwlIAlqoce6MFTWQkgxwv"

#define BLYNK_PRINT Serial

#include <ESP8266WiFi.h>

#include <BlynkSimpleEsp8266.h>

#define LEDPIN0 D5

#define LEDPIN1 D6

#define LEDPIN2 D7

char auth[] = "drBMSBM_dRwnwlIAlqoce6MFTWQkgxwv";

char ssid[] = "Shri";

char pass[] = "shri5868";

BlynkTimer timer;

BLYNK_WRITE(V0)

int pinValue0 = param.asInt();

digitalWrite(LEDPIN0,pinValue0);

BLYNK_WRITE(V1)

int pinValue1 = param.asInt();

digitalWrite(LEDPIN1,pinValue1);
}

BLYNK_WRITE(V2)

int pinValue2 = param.asInt();

digitalWrite(LEDPIN2,pinValue2);

void setup()

{ {

pinMode(D5,OUTPUT);

pinMode(D6,OUTPUT);

pinMode(D7,OUTPUT);

// Debug console

Serial.begin(115200);

Blynk.begin(auth, ssid, pass);

void loop()

Blynk.run();

timer.run();

You might also like