Here's a few line coding on my first attempt.
#define BLYNK_PRINT Serial // Comment this out to disable
prints and save space
// include your ESP library here
// and other blynk widget
#include <BlynkSimpleEsp8266.h>
#include <SoftwareSerial.h>
#include <ESP8266WiFi.h>
#include <SPI.h>
#include <DHT.h>
// Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "554d6e1520e64e33b8924af9eb66423d";
// Your WiFi credentials.
// Set password to "" for open networks.
char ssid[] = "Adam Jasman";
char pass[] = "qwertyuiop";
#define DHTPIN 5
// what pin we're connected to
#define DHTTYPE DHT22
// DHT 22 (AM2302)
DHT dht(DHTPIN, DHTTYPE);
int sensorData;
int threshold;
SimpleTimer timer; // allocate a name (mytimer) to the timer
int selectmode; //Select Mode for Auto or Manual
int button2; //Manual Blynk Case 1 ONOFF
int timer2; //Manual Blynk
int timer3; //Auto Blynk
int val; //sensor
int morning;
int night;
No comments:
Post a Comment