Internet of Things
-
Lesson-1-> Introduction to IOT4 Topics|1 Quiz
-
Lesson-2-> Introduction to Node MCU & Arduino IDE6 Topics|1 Quiz
-
Activity-1-> LED blink using Node MCU & Arduino IDE4 Topics|1 Quiz
-
1.1 What is LED?
-
1.2 Circuit connection of LED with Node MCU.
-
1.3 Code to blink a LED
-
1.4 How to upload the code?
-
Quiz-3-> LED blink using Node MCU & Arduino IDE
-
1.1 What is LED?
-
Activity-2-> Controlling of LED using Web Server5 Topics|1 Quiz
-
2.1 Introduction
-
2.2 What is server?
-
2.3 Circuit connection of LED with Node MCU
-
2.4 Code to control LED by server
-
2.5 How to give command from Local host to Node MCU
-
Quiz-4->Controlling of LED using Web Server
-
2.1 Introduction
-
Activity-3-> Interfacing of Ultrasonic sensor with Node MCU4 Topics|1 Quiz
-
3.1 What is Ultrasonic Sensor ?
-
3.2 Circuit Connection of Ultrasonic sensor with Node MCU.
-
3.3 Code for Ultrasonic sensor
-
3.4 How to upload the code ?
-
Quiz-5-> Interfacing of Ultrasonic sensor with Node MCU
-
3.1 What is Ultrasonic Sensor ?
-
Activity-4-> LED ON/OFF using Google Assistance8 Topics|1 Quiz
-
4.1 What is Google Assistance?
-
4.2 Components Required
-
4.3 What is IFTTT and how to make an account?
-
4.4 What is Adafruit and how to make an account?
-
4.5 Working of the project?
-
4.6 Circuit connection
-
4.7 Coding to control Led using Google Assistant
-
4.8 How to run the project?
-
Quiz-6-> LED ON/OFF using Google Assistance
-
4.1 What is Google Assistance?
-
Chapter-3->Introduction to ThingSpeak4 Topics
-
3.1 Introduction to Data Analytics.
-
3.2 Introduction to ThingSpeak
-
3.3 How to login in ThingSpeak
-
3.4 How it works ?
-
3.1 Introduction to Data Analytics.
-
Activity-5 –> Air quality Monitoring using NODE MCU6 Topics|1 Quiz
-
5.1 Introduction to project
-
5.2 Components Required
-
5.3 How to setup ThingSpeak
-
5.4 Circuit connection
-
5.5 Code
-
5.6 Uploading of Code
-
Quiz-7->Air quality Monitoring using NODE MCU
-
5.1 Introduction to project
-
Activity-6 –> IOT based car parking system6 Topics|1 Quiz
-
6.1 Introduction to project
-
6.2 Components Required
-
6.3 Circuit Connection
-
6.4 Coding
-
6.5 Setup of Adafruit.io
-
6.6 Uploading and working
-
Quiz-8-> IOT based car parking system
-
6.1 Introduction to project
-
Activity-7 –> IOT based motion detector using Node MCU6 Topics|1 Quiz
-
7.1 Introduction to project
-
7.2 Components Required
-
7.3 Circuit Connection of PIR sensor with Node MCU
-
7.4 How to setup Blynk App
-
7.5 Code
-
7.6 Uploading and working of code
-
Quiz-9-> IOT based motion detector using Node MCU
-
7.1 Introduction to project
-
Activity-8-> IOT based Automatic gardening System5 Topics|1 Quiz
-
8.1 Introduction to project
-
8.2 Components Required
-
8.3 Circuit Connection
-
8.4 Set up in Blynk app
-
8.5 Coding
-
Quiz-10-> IOT based Automatic gardening System
-
8.1 Introduction to project
Quizzes
7.5 Code
22/09/2021
Steps to do coding in Arduino IDE
1. Open Arduino IDE.
2. For writing this code, we have to add blynk library.
How to add a library:
- Download the blynk library from the github or you can use https://github.com/blynkkk/blynk-library this link.
- Now,Go to Sketch in the menu bar of Arduino IDE,then to Include library
- Next, select the blynk library you downloaded from the above link and after this your library will be added.
Note: If it is showing error in adding the library,then first extract the folder and then add the library.
Complete Code:
#include
#define BLYNK_PRINT Serial // Comment this out to disable prints and save space
#include
char auth[] = “YOUR AUTH CODE HERE”;
/* WiFi credentials */
char ssid[] = “YOUR SSID”;
char pass[] = “YOUR PASSWORD”;
/* Motion Detector */
#define ledPin D1
#define pirPin D5 // Input for HC-S501
int pirValue; // Place to store read PIR Value
void setup()
{
Serial.begin(115200);
delay(10);
Blynk.begin(auth, ssid, pass);
pinMode(ledPin, OUTPUT);
pinMode(pirPin, INPUT);
digitalWrite(ledPin, LOW);
}
void loop()
{
getPirValue();
Blynk.run();
}
/***************************************************
* Get PIR data
**************************************************/
void getPirValue(void)
{
pirValue = digitalRead(pirPin);
if (pirValue)
{
Serial.println(“==> Motion detected”);
Blynk.notify(“T==> Motion detected”);
}
digitalWrite(ledPin, pirValue);
}