IOT Based Baby Monitoring System

Page 5

International Journal for Research in Applied Science & Engineering Technology (IJRASET) ISSN: 2321-9653; IC Value: 45.98; SJ Impact Factor: 7.538 Volume 9 Issue XII Dec 2021- Available at www.ijraset.com E. Dumped Code #define BLYNK_PRINT Serial #include <Servo.h> Servo myservo; // create servo object to control a servo // twelve servo objects can be created on most boards int pos = 0; // variable to store the servo position #include <ESP8266WiFi.h> #include <BlynkSimpleEsp8266.h> #include <DHT.h> // You should get Auth Token in the Blynk App. // Go to the Project Settings (nut icon). char auth[] = "dyBhHOMy6udsSrLm1nZz8nyAh0_uM1qS"; // Your WiFi credentials. // Set password to "" for open networks. char ssid[] = "iPhone"; char pass[] = "harsh123"; #define DHTPIN D3 // D3 // Uncomment whatever type you're using! #define DHTTYPE DHT11 // DHT 11 DHT dht(DHTPIN, DHTTYPE); BlynkTimer timer; void sendSensor() { float h = dht.readHumidity(); float t = dht.readTemperature(); // or dht.readTemperature(true) for Fahrenheit if (isnan(h) || isnan(t)) { Serial.println("Failed to read from DHT sensor!"); return; } // You can send any value at any time. // Please don't send more that 10 values per second. Blynk.virtualWrite(V5, t); Blynk.virtualWrite(V6, h); } void setup() { // Debug console Serial.begin(9600); Blynk.begin(auth, ssid, pass); pinMode(D5,OUTPUT); pinMode(D6,OUTPUT); pinMode(D7,OUTPUT); pinMode(D8,OUTPUT); // digitalWrite(D5,HIGH); digitalWrite(D6,HIGH); digitalWrite(D7,HIGH); digitalWrite(D8,HIGH); myservo.attach(D5); myservo.write(90); dht.begin();

©IJRASET: All Rights are Reserved | SJ Impact Factor 7.538 | ISRA Journal Impact Factor 7.894 |

2187


Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.
IOT Based Baby Monitoring System by IJRASET - Issuu