0% found this document useful (0 votes)
2 views9 pages

Practical 6

Best practical ever for textile

Uploaded by

RanA KEVIN
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)
2 views9 pages

Practical 6

Best practical ever for textile

Uploaded by

RanA KEVIN
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/ 9

Practical: 6

• LED Control with Blynk and NodeMCU, ESP8266- Web dashboard and Mobile App.

#define BLYNK_TEMPLATE_ID "TMPL3W2Kifb5c"


#define BLYNK_TEMPLATE_NAME "LAB6"
#define BLYNK_PRINT Serial
#include <Adafruit_Sensor.h>
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
#include <DHT.h>

DHT dht(4,DHT11);
float h,t;
BlynkTimer timer;
char ssid[] = "vivo V23 5G";
char pass[] = "darbar777";
char auth[] = "1c_vo8EpuXxk71xVPocp4t5pjZDgbaY2";
void send_data(){
h = dht.readHumidity();
t = dht.readTemperature();
Serial.print(h);
Serial.print(",");
Serial.println(t);
Blynk.virtualWrite(V2,h);
Blynk.virtualWrite(V3,t);
}
void setup() {
Serial.begin(9600);
Blynk.begin(auth,ssid,pass);
dht.begin();
timer.setInterval(1000L,send_data);
}
void loop() {
Blynk.run();
timer.run();
}

You might also like