Iot Record
Iot Record
PAGE
EX.NO DATE EXPERIMENT NAME NO MARK SIGN
HARDWARE DETAILS
Advantages :
It is cheap
It comes with an open supply hardware feature that permits users to develop their own kit
The software of the Arduino is well-suited with all kinds of in operation systems like Linux,
Windows, and Macintosh, etc.
It also comes with open supply software system feature that permits tough software system
developers to use the Arduino code to merge with the prevailing programing language libraries
and may be extended and changed.
For beginners also it is very simple to use.
SOFTWARE DETAILS
Programming Structure:
Programming :
Edit :
Tools :
AIM:
To perform interfacing of LED using ARDUINO and evaluate the response of variations.
APPARATUS REQUIRED:
1. Arduino Kit
2. USB Cable
3. Arduino SDK Software tool
4. Patch cards
THEORY:
LEDs are the most efficient way to turn an electric current into illumination. When a current
flows through a diode in the forward direction, it consists of surplus electrons moving in one direction
in the lattice and ―holes‖ (voids in the lattice) moving in the other. Occasionally, electrons can
recombine with holes. When they do, the process releases energy in the form of photons. This is true of
all semiconductor junctions, but LEDs use materials that maximize the effect. The color of the light
emitted (corresponding to the energy of the photon) is determined by the semiconductor materials that
form the diode junction.
The latest high-brightness (HB) white LEDs are made possible by the discovery of
semiconductor materials that produce blue or ultraviolet photons. In addition to the diode, an HB
package contains ―yellow‖ phosphors on the inside of its lens. Some ―blue‖ photons escape, but others
excite the phosphors, which then give off ―yellow‖ photons. The result can be tuned in manufacturing to
produce ―white‖ light.
There are 4 LEDs in the kit namely D4, D5, D6 and D7. They are to be connected to the D4,
D5, D6 and D7 pins of Arduino board. The power supply +5V and Gnd pins of Arduino
board also are to be connected in this section.
Connect the USB connector to the USB of Arduino board and the computer system.
Using this program, the first LED (left most LED) is switched on for 0.5 sec and then it is
switched off.
After 0.5 sec., the second LED is switched on for 0.5 sec. and then it is switched off. In this
way, all the four LEDs are switched on and off. Then the cycle repeats continuously.
In computer, open the sketch software and write the program LED blinking and execute the
program in sketch and check for the proper result.
PROGRAM :
int LED_PIN = 8;
void setup()
{
pinMode(LED_PIN, OUTPUT);
}
void loop()
{
digitalWrite(LED_PIN, HIGH);
delay(1000);
digitalWrite(LED_PIN, LOW);
delay(1000);
}
RESULT:
Blinking of LED is performed by interfacing LED using ARDUINO and evaluated the response
of variations.
AIM:
To perform interfacing of LED Pattern with Push Button Control using Arduino and evaluate the
response of variations.
APPARATUS REQUIRED:
1. Arduino Kit
2. USB Cable
3. Arduino SDK Software tool
4. Patch cards
THEORY:
Usually each push button switch has two pairs of contacts. Each pair of contacts consists of a NO
contact and a NC contact. When the button is pressed, the two pairs of contacts act simultaneously, the
NC contact is disconnected, and the NO contact is closed.
A 'push to make' switch allows electricity to flow between its two contacts when held in. When the
button is released, the circuit is broken. This type of switch is also known as a Normally Open (NO)
Switch. (Examples: doorbell, computer case power switch, calculator buttons, individual keys on a
keyboard)
A 'push to break' switch does the opposite, i.e. when the button is not pressed, electricity can flow,
but when it is pressed the circuit is broken. This type of switch is also known as a Normally Closed
(NC) Switch. (Examples: Fridge Light Switch, Alarm Switches in Fail-Safe circuits)
Many Push switches are designed to function as both 'push to make' and 'push to break' switches. For
these switches, the wiring of the switch determines whether the switch functions as a 'push to make' or
as a 'push to break' switch.
There are 4 switches and 4 LEDs. The program is written such that when the particular
switch is pressed, the LED just above the switch will glow. Though the program is lengthy,
the program is simple.
Connect the LEDs D4, D5, D6 and D7 to digital pins 4, 5, 6, 7 of Arduino. Similarly,
connect Sw8, Sw9, Sw10 and Sw11 to digital pins 8,9,10,11 of Arduino. Connect +5V and
Gnd from Arduino board.
Program
void setup() {
// initialize the LED pin as an output:
pinMode(ledPin, OUTPUT);
// initialize the pushbutton pin as an input:
pinMode(buttonPin, INPUT);
}
void loop() {
// read the state of the pushbutton value:
buttonState = digitalRead(buttonPin);
RESULT:
LED with pushbutton control is performed by interfacing LED using ARDUINO and evaluated
the response of variations.
AIM:
To display Hello World message in LCD using ARDUINO
APPARATUS REQUIRED:
1. Arduino Kit
2. USB Cable
3. Arduino SDK Software tool
4. Patch cards
THEORY:
In this experiment, 16 characters (columns) and 2 lines (rows) LCD is used. In the internal library of
Sketch software, there is a library called LiquidCrystal. It is defined as LiquidCrystal.h
This header file has to be used in the beginning of the program. This library has got many functions
that can be used in the program. We are going to see only a few functions of the LiquidCrystal.h in
this program.
Demonstrates the use a 16x2 LCD display. The LiquidCrystal library works with all LCD displays
that are compatible with the Hitachi HD44780 driver. There are many of them out there, and you can
usually tell them by the 16-pin interface. This sketch prints "Hello World!" to the LCD and shows the
time.
The circuit:
* LCD RS pin to digital pin 12
* LCD Enable pin to digital pin 11
* LCD D4 pin to digital pin 4
* LCD D5 pin to digital pin 5
* LCD D6 pin to digital pin 6
* LCD D7 pin to digital pin 7
* LCD R/W pin to ground
* LCD VSS pin to ground
* LCD VCC pin to 5V
* 10K resistor:
* ends to +5V and ground
* wiper to LCD VO pin (pin 3)
*/
#include <LiquidCrystal.h>
void setup() {
// set up the LCD's number of columns and rows:
lcd.begin(16, 2);
// Print a message to the LCD.
lcd.print("hello, world!");
}
void loop() {
// set the cursor to column 0, line 1
// (note: line 1 is the second row, since counting begins with 0):
// lcd.setCursor(0, 1);
// print the number of seconds since reset:
// lcd.print(millis() / 1000);
}
RESULT:
Hello World message with time is displayed in LCD using ARDUINO
AIM:
To perform interfacing of RC Servo Motor using Arduino board and evaluate the response of
variations.
APPARATUS REQUIRED:
1. Arduino Kit
2. USB Cable
3. Arduino SDK Software tool
4. Patch cards
THEORY:
RC servo motor can be used to set the position of the shaft of the servo motor to 0 to 180 degrees.
50 Hz frequency pulses (Period 20msec) with pulse width (0.5 to 2.5msec) positions the servo between
0 degrees and 180 degrees.
There is a built-in servo library in sketch software. It is used by writing #include Servo.h as the first
line in the Arduino program. In this experiment, potentiometer is used to output 0-5V analog voltage.
The analog voltage is read in A0 pin using analogRead function. It converts the 0-5V analog
voltage to 10 bit digital outputs (10 bit resolution) and digital output with decimal value 0-1023.
This read value is sent out from the Arduino as PWM signal in pin D9. The 0-1023 value is
changed to the output of 0-255. If the analog converted value is 1023, then the output will have full
on time pulse width 255. If the analog converted value is 500, then the output will have on time
pulse width of (1023/255) x 500. Since the pulses are continuous, the average output will be dc
voltage depending upon the analog voltage input.
#include <Servo.h>
int servoPin = 9;
Servo servo;
int angle = 0; // servo position in degrees
void setup()
{
servo.attach(servoPin);
}
void loop()
{
// scan from 0 to 180 degrees
for(angle = 0; angle < 180; angle++)
{
servo.write(angle);
delay(15);
}
RESULT:
To perform interfacing of RC Servo Motor using Arduino board and evaluate the response of variations.
AIM:
To perform interfacing of temperature sensor LM35 Thermistor IC with Arduino and evaluate
the response of variations.
APPARATUS REQUIRED:
1. Arduino Kit
2. USB Cable
3. Arduino SDK Software tool
4. Patch cards
THEORY:
Temperature is the most-measured process variable in industrial automation. Most commonly, a
temperature sensor is used to convert temperature value to an electrical value. Temperature Sensors are
the key to read temperatures correctly and to control temperature in industrials applications.
A large distinction can be made between temperature sensor types. Sensors differ a lot in
properties such as contact-way, temperature range, calibrating method and sensing element. The
temperature sensors contain a sensing element enclosed in housings of plastic or metal. With the help of
conditioning circuits, the sensor will reflect the change of environmental temperature.
In the temperature functional module we developed, we use the LM34 series of temperature
sensors. The LM34 series are precision integrated-circuit temperature sensors, whose output voltage is
linearly proportional to the Fahrenheit temperature. The LM34 thus has an advantage over linear
temperature sensors calibrated in degrees Kelvin, as the user is not required to subtract a large constant
voltage from its output to obtain convenient Fahrenheit scaling. The LM34 does not require any
external calibration or trimming to provide typical accuracies of ±1.2°F at room temperature and
±11.2°F over a full -50 to +300°F temperature range. The LM34 is rated to operate over a -50° to
+300°F temperature range.
LM 35 IC is a 3 pin IC. It has Vcc and Gnd pins and another output pin. +5V and Gnd are connected
to Vcc and Gnd pins. The output pin gives the output 10mV per degree centigrade. For example, if the
ambient temperature is 30°C, then the output pin gives 300mV dc output. The output pin is connected
to A0 analog input of Arduino. Arduino uses 10 bit analog to digital converter. The 10 bit resolution is
1024. 0-5V input is read as 0-1023 inside the Arduino in this analog input A0. There are A0, A1, A2,
PROGRAM:
// Temperature is measured using sensor LM35.
// It gives 10mV output per degree centigrade
// since adc has 10 bit resolution, maximum voltage is 5V
// 10 bit resolution, number 1023 is output for 5V
// for one bit change, voltage required is 4.88mV
// 10mV/4.88mV = 2.05. Use this factor to display degree centigrade
// LCD is used to display temperature
#include<LiquidCrystal.h>
LiquidCrystal lcd(12, 11, 4, 5, 6, 7);
const int sensor=A1; // Assigning analog pin A1 to variable 'sensor'
float tempc; //variable to store temperature in degree Celsius
float tempf; //variable to store temperature in Fahreinheit
float vout; //temporary variable to hold sensor reading
void setup()
{
pinMode(sensor,INPUT); // Configuring pin A1 as input
Serial.begin(9600);
lcd.begin(16,2);
delay(500);
}
void loop()
{
vout=analogRead(sensor);
vout=(vout*500)/1023;
tempc=vout; // Storing value in Degree Celsius
tempf=(vout*1.8)+32; // Converting to Fahrenheit
lcd.setCursor(0,0);
lcd.print("in DegreeC= ");
lcd.print(tempc);
lcd.setCursor(0,1);
lcd.print("in Fahrenheit=");
lcd.print(tempf);
delay(1000); //Delay of 1 second for ease of viewing in serial monitor
}
RESULT:
Temperature is measured using temperature sensor LM35 Thermistor IC with Arduino and
evaluated the response of variations.
AIM:
To perform interfacing of Ultrasonic Sensor with Arduino and evaluate the response of
variations.
APPARATUS REQUIRED:
1. Arduino Kit
2. USB Cable
3. Arduino SDK Software tool
4. Patch cards
THEORY:
An ultrasonic sensor is an electronic device that measures the distance of a target object by
emitting ultrasonic sound waves, and converts the reflected sound into an electrical signal.
Ultrasonic waves travel faster than the speed of audible sound (i.e. the sound that humans can hear).
Ultrasonic sensor HC-SR04 sensor is used. A burst of ultrasonic waves is transmitted. It hits the
object and return back in the form of echo. Time difference of outgoing waves and returning echo
is proportional to twice the distance travelled. HC – SR04 has 4 pins. 2 pins are +5V and Gnd.
There are Triggering and Echo signal pins.
Connect trigger signal pin to A4 analog pin and echo signal pin to A5 analog pin of Arduino
void setup()
{
lcd.begin(16, 2); // Initializes the interface to the LCD screen, and specifies the dimensions (width and
height) of the display
pinMode(trigPin, OUTPUT);
pinMode(echoPin, INPUT);
}
void loop()
{
digitalWrite(trigPin, LOW);
delayMicroseconds(2);
digitalWrite(trigPin, HIGH);
delayMicroseconds(10);
digitalWrite(trigPin, LOW);
duration = pulseIn(echoPin, HIGH);
distanceCm = duration * 0.034 / 2;
distanceInch = duration * 0.0133 / 2;
lcd.setCursor(0, 0); // Sets the location at which subsequent text written to the LCD will be displayed
lcd.print("Distance: "); // Prints string "Distance" on the LCD
lcd.print(distanceCm); // Prints the distance value from the sensor
lcd.print(" cm");
delay(10);
lcd.setCursor(0, 1);
lcd.print("Distance: ");
lcd.print(distanceInch);
lcd.print(" inch");
delay(10);
}
RESULT:
Distance is measured using Ultrasonic sensor with Arduino and evaluated the response of
variations.
AIM:
To perform interfacing of IR Sensor with Arduino and evaluate the response of variations.
APPARATUS REQUIRED:
1. Arduino Kit
2. USB Cable
3. Arduino SDK Software tool
4. Patch cards
THEORY:
An infrared sensor (IR sensor) is a radiation-sensitive optoelectronic component with a spectral
sensitivity in the infrared wavelength range from 780 nm to 50 µm. IR sensors are now widely used in
motion detectors, which are used in building services to switch on lamps or in alarm systems to detect
unwelcome guests.
void setup()
{
pinMode(13, OUTPUT); // Pin 13 has an LED connected on most Arduino boards:
pinMode(ProxSensor,INPUT); //Pin A0 is connected to the output of proximity sensor
Serial.begin(9600);
}
void loop()
{
if(digitalRead(ProxSensor)==HIGH) //Check the sensor output
{
digitalWrite(13, HIGH); // set the LED on
}
else
{
digitalWrite(13, LOW); // set the LED off
}
inputVal = analogRead(ProxSensor);
Serial.println(inputVal);
delay(1000); // wait for a second
}
RESULT:
Temperature is measured using IR Sensor with Arduino and evaluated the response of
variations.
AIM:
To interface Node MCU ESP32 to bluetooth module
APPARATUS REQUIRED:
THEORY:
Node MCU is a low-cost open source IoT platform. And it is used to communicate sensors data
with the cloud platform. It initially included firmware which runs on the ESP8266 Wi-
Fi SoC from Espressif Systems, and hardware which was based on the ESP-12 module. Later support
for the ESP32 32-bit MCU was added.
Both the firmware and prototyping board designs are open source.
The firmware uses the Lua scripting language. The firmware is based on the eLua project, and built on
the Espressif Non-OS SDK for ESP8266. It uses many open source projects, such as lua-
cjson and SPIFFS. Due to resource constraints, users need to select e modules relevant for their project
and build a firmware tailored to their needs. Support for the 32-bit ESP32 has also been implemented.
0 [*] GPIO16
1 GPIO5
2 GPIO4
3 GPIO0
4 GPIO2
5 GPIO14
6 GPIO12
7 GPIO13
8 GPIO15
9 GPIO3
10 GPIO1
11 GPIO9
12 GPIO10
void setup()
{
pinMode(LED, OUTPUT);
Serial.begin(9600); /* Define baud rate for serial communication */
}
void loop()
{
RESULT:
• Python is Interpreted − Python is processed at runtime by the interpreter. You do not need to
compile your program before executing it. This is similar to PERL and PHP.
• Python is Interactive − You can actually sit at a Python prompt and interact with the interpreter
directly to write your programs.
• Python is Object-Oriented − Python supports Object-Oriented style or technique of programming
that encapsulates code within objects.
• Python is a Beginner's Language − Python is a great language for the beginner-level programmers
and supports the development of a wide range of applications from simple text processing to WWW
browsers to games.
Apart from the above-mentioned features, Python has a big list of good features, few are listed below
• Arithmetic Operators
• Comparison (Relational) Operators
• Assignment Operators
• Logical Operators
• Bitwise Operators
• Membership Operators
• Identity Operators Let us have a look on all operators one by one.
AIM:
To perform interfacing of LED using Raspberry Pi board and evaluate the response of
variations.
APPARATUS REQUIRED:
1. Raspberry Pi board in Embedded IOT Kit
2. Loaded Raspbian OS in SD Card
3. USB keyboard
4. USB mouse
5. Monitor/Display (with HDMI, DVI, or Composite input)
6. Power Supply
7. Internet connectivity - LAN cable/Wifi
8.Powered USB Hub
Theory:
LEDs are the most efficient way to turn an electric current into illumination. When a current
flows through a diode in the forward direction, it consists of surplus electrons moving in one direction
in the lattice and ―holes‖ (voids in the lattice) moving in the other. Occasionally, electrons can
recombine with holes. When they do, the process releases energy in the form of photons. This is true of
all semiconductor junctions, but LEDs use materials that maximize the effect. The color of the light
emitted (corresponding to the energy of the photon) is determined by the semiconductor materials that
form the diode junction.
The latest high-brightness (HB) white LEDs are made possible by the discovery of
semiconductor materials that produce blue or ultraviolet photons. In addition to the diode, an HB
package contains ―yellow‖ phosphors on the inside of its lens. Some ―blue‖ photons escape, but others
excite the phosphors, which then give off ―yellow‖ photons. The result can be tuned in manufacturing to
produce ―white‖ light.
PROCEDURE:
There are 4 LEDs in the kit namely D4, D5, D6 and D7. They are to be connected to the D4,
D5, D6 and D7 pins of Arduino board. The power supply +5V and Gnd pins of Arduino
board also are to be connected in this section.
Connect the USB connector to the USB of Raspberry Pi board.
Using this program, the first LED (left most LED) is switched on for 0.5 sec and then it is
switched off.
After 0.5 sec., the second LED is switched on for 0.5 sec. and then it is switched off. In this
way, all the four LEDs are switched on and off. Then the cycle repeats continuously.
In computer, open the sketch software and write the program LED blinking and execute the
program in sketch and check for the proper result.
Python Program:
Result:
LED blinking is performed using Raspberry Pi board and evaluated the response of variations.
Aim :
To Perform Interfacing of DTH 11 Temperature and Humidity sensor with Raspberry Pi and
evaluate the response of variations.
APPARATUS REQUIRED:
1. Raspberry Pi board in Embedded IOT Kit
2. Loaded Raspbian OS in SD Card
3. USB keyboard
4. USB mouse
5. Monitor/Display (with HDMI, DVI, or Composite input)
6. Internet connectivity - LAN cable/Wifi
7. Patch cards
8. Power Adapter
THEORY:
Humidity is the measure of water vapour present in the air. The level of humidity in air affects
various physical, chemical and biological processes. In industrial applications, humidity can affect the
business cost of the products, health and safety of the employees. So, in semiconductor industries and
control system industries measurement of humidity is very important. Humidity measurement
determines the amount of moisture present in the gas that can be a mixture of water vapour, nitrogen,
argon or pure gas etc. Humidity sensors are of two types based on their measurement units. They are a
relative humidity sensor and Absolute humidity sensor. DHT11 is a digital temperature and humidity
sensor.
For measuring temperature this sensor uses a Negative Temperature coefficient thermistor, which causes a
decrease in its resistance value with increase in temperature. To get larger resistance value even for the smallest
change in temperature, this sensor is usually made up of semiconductor ceramics or polymers.
The temperature range of DHT11 is from 0 to 50 degree Celsius with a 2-degree accuracy. Humidity range of this
sensor is from 20 to 80% with 5% accuracy. The sampling rate of this sensor is 1Hz .i.e. it gives one reading for
every second. DHT11 is small in size with operating voltage from 3 to 5 volts. The maximum current used while
measuring is 2.5mA.
PROCEDURE:
import time
import board
import adafruit_dht
dhtDevice = adafruit_dht.DHT11(board.D4, use_pulseio=False) ## Raspberry pi 4 - gpio4
while True:
try:
# Print the values to the serial port
temperature_c = dhtDevice.temperature
temperature_f = temperature_c * (9 / 5) + 32
humidity = dhtDevice.humidity
print(
"Temp: {:.1f} F / {:.1f} C Humidity: {}% ".format(
temperature_f, temperature_c, humidity
)
)
time.sleep(2.0)
Result:
Temperature and Humidity is measured using DTH 11 sensor using Raspberry Pi and evaluated
the response of variations.
AIM:
To perform communication between Arduino and Raspberry Pi using any Wireless medium and
evaluate the response.
APPARATUS REQUIRED:
PROCEDURE :
1. Arduino:
Write the arduino program and upload it
As per connection bluetooth to arduino TX-RX, RX-TX
2. Raspberry Pi:
Connect the bluetooth on raspberry pi ,right corner click bluetooth icon and pair
finally disconnect the raspberry bluetooth -sudo rfcomm release 7 ----mac address---
void setup()
{
pinMode(led, OUTPUT);
Serial.begin(9600); //default baud rate for bt 38400
}
void loop()
{
if(Serial.available())
{
int a=Serial.parseInt();
Serial.println(a);
if (a==1)
{
digitalWrite(led, HIGH);
}
if (a == 0)
{
digitalWrite(led, LOW);
}
}
}
Raspberry Pi Program :
import serial
import time
bluetooth=serial.Serial("/dev/rfcomm7",9600)
while True:
a=input("enter:-")
string='X{0}'.format(a)
bluetooth.write(string.encode("utf-8"))
RESULT:
Communication between Arduino and Raspberry Pi using Wireless medium is performed and evaluated
the response.
AIM:
To setup a cloud platform using NODE MCU module and Think Speak Cloud, writing and reading the
temperature data
APPARATUS REQUIRED:
1. Raspberry Pi board in Embedded IOT Kit
2. Loaded Raspbian OS in SD Card
3. USB keyboard
4. USB mouse
5. Monitor/Display (with HDMI, DVI, or Composite input)
6. Internet connectivity - LAN cable/Wifi
7. Patch cards
8. Power Adapter
THEORY:
Node MCU is a low-cost open source IoT platform. It initially included firmware which runs on
the ESP8266 Wi-Fi SoC from Espressif Systems, and hardware which was based on the ESP-12
module. Later support for the ESP32 32-bit MCU was added.
Both the firmware and prototyping board designs are open source.
The firmware uses the Lua scripting language. The firmware is based on the eLua project, and built on
the Espressif Non-OS SDK for ESP8266. It uses many open source projects, such as lua-
cjson[9] and SPIFFS. Due to resource constraints, users need to select the modules relevant for their
project and build a firmware tailored to their needs. Support for the 32-bit ESP32 has also been
implemented.
0 [*] GPIO16
1 GPIO5
2 GPIO4
3 GPIO0
4 GPIO2
5 GPIO14
6 GPIO12
7 GPIO13
8 GPIO15
9 GPIO3
10 GPIO1
11 GPIO9
12 GPIO10
ThingSpeak is a cloud space owned by Matlab. Initially, we have to get an account and create
a new channel with say one field and save the channel. Then next screen appears in which
write and read api keys are available. These keys are noted and used later in the program.
In this experiment, temperature is read and it is stored in the ThingSpeak cloud space.
Enter Name and Field. You may have multiple Fields depending on number of sensor create multiple fields such
as Light, Temperature, Humidity, etc.
Enter Name and Label thing speak esp8266
Keep everything else as it is. Blank or default values. and click on Save Channel. Thing Speak save channel
AT – Attention
AT+ RST - Reset
PROGRAM:
String apiKey = " "; // Enter your Write API key from ThingSpeak
const char *ssid = " "; // replace with your wifi ssid and wpa2 key
const char *pass = " ";
const char* server = "api.thingspeak.com";
WiFiClient client;
void setup()
{
Serial.begin(115200);
delay(10);
dht.begin();
Serial.println("Connecting to ");
Serial.println(ssid);
WiFi.begin(ssid, pass);
void loop()
{
float h = dht.readHumidity();
float t = dht.readTemperature();
if (isnan(h) || isnan(t))
{
Serial.println("Failed to read from DHT sensor!");
return;
}
Serial.print("Temperature: ");
Serial.print(t);
Serial.print(" degrees Celcius, Humidity: ");
Serial.print(h);
Serial.println("%. Send to Thingspeak.");
}
client.stop();
OUT PUT :
RESULT:
A cloud platform is setup using NODE MCU module and using Think Speak Cloud, writing and
reading the temperature data is performed
AIM:
To log data using Raspberry Pi and upload to the cloud platform
APPARATUS REQUIRED:
1. Raspberry Pi board in Embedded IOT Kit
2. Loaded Raspbian OS in SD Card
3. USB keyboard
4. USB mouse
5. Monitor/Display (with HDMI, DVI, or Composite input)
6. Internet connectivity - LAN cable/Wifi
7. Patch cards
8. Power Adapter
THEORY:
Today the Internet has become ubiquitous, has touched almost every corner of the globe, and is
affecting human life in unimaginable ways.
We are now entering an era of even more pervasive connectivity where a very wide variety of
appliances will be connected to the web.
One year after the past edition of the Cluster book 2012 it can be clearly stated that the
Internet of Things (IoT) has reached many different players and gained further recognition. Out of the
potential Internet of Things application areas, Smart Cities (and regions), Smart Car and mobility,
Smart Home and assisted living, Smart Industries, Public safety, Energy & environmental protection,
Agriculture and Tourism as part of a future IoT Ecosystem (Figure 1.1) have acquired high attention.
2. Another is the Internet of Things is defined as a paradigm in which computing and networking
capabilities are embedded in any kind of conceivable object.
import httplib
import urllib
import time
key = "4IX9VESM09B9MQ7H" # Put your API Key here
def thermometer():
while True:
#Calculate CPU temperature of Raspberry Pi in Degrees C
temp = int(open('/sys/class/thermal/thermal_zone0/temp').read()) / 1e3 # Get Raspberry Pi CPU
temp
params = urllib.urlencode({'field1': temp, 'key':key })
headers = {"Content-typZZe": "application/x-www-form-urlencoded","Accept": "text/plain"}
conn = httplib.HTTPConnection("api.thingspeak.com:80")
try:
conn.request("POST", "/update", params, headers)
response = conn.getresponse()
print temp
print response.status, response.reason
data = response.read()
conn.close()
except:
print "connection failed"
break
if __name__ == "__main__":
while True:
thermometer()
RESULT:
Thus the data is logged using Raspberry Pi and upload to the cloud platform
AIM:
To design an IOT based System with Node MCU ESP8266 and BLYNK App and evaluate the
response of variations.
APPARATUS REQUIRED:
Theory :
A quick guide to designing a perfect Internet of Things (IoT) system taking into account performance,
connectivity, power consumption and security issues
The Internet of Things (IoT) is no longer a technology of the future. Smart cities, connected industries
and smart households have indeed ushered in an era where machines can communicate. The beauty of
this technology lies in the fact that the complex backend structure of systems is represented to the end-
user in the simplest possible form. This requires profound design know-how.
The IoT can be designed at different scales for different uses. It can start from our homes with simple
lighting or appliance control, and expand into the realm of factories and industries with automated
machines, smart security systems and central management systems—called connected factories. It has
scaled up to entire cities with smart parking, smart metering, waste management, fire control, traffic
management and any similar functions involved. However, irrespective of the scale of application, the
main IoT backbone remains similar.
The ESP8266 is a system on a chip (SOC) Wi-Fi microchip for Internet of Things (IoT) applications
produced by Espressif Systems.
Given its low cost, small size and adaptability with embedded devices, the ESP8266 is now used
extensively across IoT devices. Although it’s now been succeeded by the newer generation ESP32
microcontroller chip, the ESP8266 is still a popular choice for IoT developers and manufacturers.
In this article, we’ll explain the main features of ESP8266 modules and development boards and their
application within the world of IoT.
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
void setup( )
{
// Initialize Serial Monitor
Serial.begin(9600);
// Connect to Wi-Fi
Blynk.begin(auth, ssid, pass);
void loop( )
{
Blynk.run( );
}
According to the diagram we can see that there is switch like thing inside the relay module whose one
end is connected to COM i.e. Pin 4 and the other end is either connected between NO i.e. Pin 5 or NC
i.e. Pin 6. When we are applying 0 V to the signal pin i.e. Pin 3 then the switch remains in NO position
(normally open). When we apply +5 V to signal pin the switch drips from NO to NC (normally
connected).
Download the BLYNK App from Google Playstore (link has been already given). Open it and you have
to make an account there. After that click on "New Project". Now you have to click "CHOOSE
DEVICE" and you will be asked to select required hardware, you will choose "Arduino UNO" and in
"CONNECTION TYPE" you have to select "USB".You have to give a project name also. Then you
click on "Create".Your project is now created and BLYNK will send an authorization token to your
mail which you have to put in the arduino code.Then you will get a free space where you have to add
buttons,graphs etc. You will get all these from the widget box. In this project as we are operating only
one appliance so we will add only one button. After clicking on "Button" the icon will be added in the
free space. You can plasce the button anywhere on the screen. Then you have to click on the button to
First of all you have to add the following link in "additional boards manager URL" in preferences in the
Arduino IDE. Link : http://arduino.esp8266.com/stable/package_esp8266c...
Just copy the code(already provided) or you can get the code from Examples-->Blynk--
>Boards_USB_Serials-->Arduino_Serial_USB. In both cases the only change you have to make is
that copy the authorization code sent to your mail to Arduino code. Don't upload the code now. Now
open "Command Prompt" and run it as administration. A black screen will appear on the screen. Then
you have to copy the path of "scripts" folder. In my case it is "My
Documents\Arduino\libraries\Blynk\scripts" and paste it on the black screen and place enter. Then you
have to copy and paste the .bat file in the black screen. The file is "blynk-ser.bat -c COM4" .You have
to change the COM port number. In my case it was COM8 .Now upload the arduino code .Now come
back to the command prompt part and press "enter" thrice. This will connect you to Blynk Server .
Now open blynk app from your mobile and open the project you have created. If your system is
connected to Blynk server then you will see 'Online' in your mobile otherwise you will see 'Offline'.
Now click on the button to On or Off the appliance. If it is not working then check whether the system
is connected to the blynk server.
RESULT:
An IOT based System with Node MCU ESP8266 and BLYNK App was designed and evaluated
the response of variations.