Iot Lab Manual-1
Iot Lab Manual-1
Introduction to Arduino
5 platform and programming
Interfacing Arduino to
8 Bluetooth Module
9 Introduction to Raspberry PI
platform and python
programming
10 Interfacing sensors to
Raspberry PI
11 Communicate between
Arduino and Raspberry PI
using any wireless medium
12 Setup a cloud platform to log
the data
13 Log Data using Raspberry PI
and upload to the cloud
platform
14 Design an IOT based system
EX.NO:01
8051 Assembly Language Experiments Using Keil Software
DATE:
AIM:
To perform the following operation using assembly language in keil ide.
➢ Sum of n number
➢ Addition of two arrays
➢ Multiplication of 2 2-type number.
SOFTWARE REQUIREMENTS
➢ Keil µvision 4
STEP 2: Select “New µvision Project” from project in the menu bar.
STEP 3: Browse and create a new project in the required location.
STEP 4: Select the target device(here,LPC1768 from NXP) from the list or type the exact name of the device.
Press OK.
STEP 5: Copy start up to Project folder and add to project file”?- Press NO.
STEP 6: In the project window, right click on source and select Add new item to group “source group 1”
STEP 7: Select Asm file and give name of the file with .s extension and press ADD.
STEP 10: Check for errors and warnings in the bottom window.
STEP 11: If no error,Select “Build” icon from tool bar or from menu bar.
STEP 12: Start the debug session from Menu bar.
STEP 14: Press function key F11 or select “step” option under Debug menu for single step execution and
verify the output in register window/Memory window/xPSR.
1. SUM OF N NUMBERS:
ALGORITHM:
➢ Take 5 number & store in internal memory.
➢ Add it in accumulator.
➢ Store the result in register.
➢ View the result.
ASSEMBLY CODE:
ORG 000H
MOV A,#00H
MOV R0,#40H
MOV R1,#05
LABEL: ADD A,@R0 INC
R0
DJNZ R1,LABEL
MOV R2,A
END
INPUT:
I40:01 I41:02 I42:03
I43:04 I44:05
OUTPUT:
R2:0F
ASSEMBLY CODE:
ORG 000H
MOV RO,#50H
MOV R1,#60H MOV
R2,#05
LABEL: MOV A,@R0
ADD A,@R0
MOV @R0,A
INC R0
INC R1
DJNZ R2,LABEL END
INPUT
I50:01 I50:02 I50:03 I50:04 150:05
I60:02 I61:02 I62:03 I63:04 I64:05
OUTPUT:
OUTPUT:
I40:1F I41:E7 I42:AA I43:08
VALUE: 08AAE71F
RESULT:
Simple operation using assembly language in KEIL IDE is executed successfully.
EX.NO:02 DATA TRANSFER BETWEEN REGISTERS AND MEMORY
DATE:
AIM:
In this program explain about how to test data transfer between registers and memory
SOFTWARE REQUIREMENTS
➢ Keil µvision 4
PROCEDURE:
STEP 1: Double click on µvision 4 icon in the desktop.
STEP 2: Select “New µvision Project” from project in the menu bar.
STEP 3: Browse and create a new project in the required location
STEP 4: Select the target device(here,LPC1768 from NXP) from the list or type the exact name
of the device. Press OK.
STEP 5: Copy start up to Project folder and add to project file”?- Press NO.
STEP 6: In the project window, right click on source and select Add new item to group
“source group1”
STEP 7: Select Asm file and give name of the file with .s extension and press ADD.
STEP 8: Type the program in the editor space and save.
STEP 9: Translate the program by select the icon from tool bar or from menu bar.
STEP 9: Translate the program by select the icon from tool bar or from menu bar.
STEP 10: Check for errors and warnings in the bottom window.
STEP 11: If no error,Select “Build” icon from tool bar or from menu bar.
STEP 12: Start the debug session from Menu bar.
STEP 13: Press OK
STEP 14: Press function key F11 or select “step” option under Debug menu for single step
execution and verify the output in register window/Memory window/xPSR.
CODING:
Result:
INPUT: 00000011h,00000022h,00000033h,00000044h,00000055h.
OUTPUT at dst : 00000011h,00000022h,00000033h,00000044h,00000055h.
RESULT:
Successfully transfer data from registers to memory using keil ide.
EX.NO:03 PERFORM ALU OPERATIONS
DATE:
AIM:
To perform the addition, subtraction, multiplication of two 16-bit numbers and to perform
logical operations AND, OR, XOR on two eight bit numbers using keil ide.
SOFTWARE REQUIREMENTS
➢ Keil µvision 4
PROCEDURE:
STEP 1: Double click on µvision 4 icon in the desktop.
STEP 2: Select “New µvision Project” from project in the menu bar.
STEP 3: Browse and create a new project in the required location
STEP 4: Select the target device(here,LPC1768 from NXP) from the list or type the exact
name of the device. Press OK.
STEP 5: Copy start up to Project folder and add to project file”?- Press NO.
STEP 6: In the project window, right click on source and select Add new item to group
“source group1”
STEP 7: Select Asm file and give name of the file with .s extension and press ADD.
STEP 8: Type the program in the editor space and save.
STEP 9: Translate the program by select the icon from tool bar or from menu bar.
STEP 9: Translate the program by select the icon from tool bar or from menu bar.
STEP 10: Check for errors and warnings in the bottom window.
STEP 11: If no error,Select “Build” icon from tool bar or from menu bar.
STEP 12: Start the debug session from Menu bar.
STEP 13: Press OK
STEP 14: Press function key F11 or select “step” option under Debug menu for single step
execution and verify the output in register window/Memory window/xPSR.
Result:
Input: Output:
SUBTRACTION OF TWO 16-BIT NUMBERS.
Result:
Note: Try with different data. Ex: (Smaller number) – (larger number).
Result:
Note: Write the logic of the program. Try with some other logic.
RESULT:
Successfully performed the addition, subtraction, multiplication of two 16-bit numbers and to
perform logical operations AND, OR, XOR on two eight bit numbers using keil ide.
EX.NO:04(A) BINARY ARITHMETIC PROGRAMS USING EMBEDDED C
DATE:
AIM:
To write a program in basic arithmetic programs using embedded C.
SOFTWARE REQUIREMENTS
➢ Keil µvision 4
PROCEDURE:
STEP 1: Double click on µvision 4 icon in the desktop.
STEP 2: Select “New µvision Project” from project in the menu bar.
STEP 3: Browse and create a new project in the required location
STEP 4: Select the target device(here,LPC1768 from NXP) from the list or type the exact name
of the device. Press OK.
STEP 5: Copy start up to Project folder and add to project file”?- Press NO.
STEP 6: In the project window, right click on source and select Add new item to group
“source group1”
STEP 7: Select Asm file and give name of the file with .s extension and press ADD.
STEP 8: Type the program in the editor space and save.
STEP 9: Translate the program by select the icon from tool bar or from menu bar.
STEP 9: Translate the program by select the icon from tool bar or from menu bar.
STEP 10: Check for errors and warnings in the bottom window.
STEP 11: If no error,Select “Build” icon from tool bar or from menu bar.
STEP 12: Start the debug session from Menu bar.
STEP 13: Press OK
STEP 14: Press function key F11 or select “step” option under Debug menu for single step
execution and verify the output in register window/Memory window/xPSR.
THEORY :
Arithmetic Operators are the type of operators in C that are used to perform
mathematical operations in a C program. They can be used in programs to define expressions and
mathematical formulas. The C arithmetic operators are the symbols that are used to perform
mathematical operations on operands. There are a total of 9 arithmetic operators in C to provide the
basic arithmetic operations such as addition, subtraction, multiplication, etc.
x–y
– Subtraction Subtract the second operand from the first operand.
C
// C program to demonstrate syntax of binary arithmetic
// operators
#include <stdio.h>
int main()
{
int a = 10, b = 4, res;
// printing a and b
printf("a is %d and b is %d\n", a, b);
res = a + b; // addition
printf("a + b is %d\n", res);
res = a - b; // subtraction
printf("a - b is %d\n", res);
res = a * b; // multiplication
printf("a * b is %d\n", res);
res = a / b; // division
printf("a / b is %d\n", res);
res = a % b; // modulus
printf("a %% b is %d\n", res);
return 0;
}
Output
a is 10 and b is 4
a + b is 14 a - b
is 6 a * b is 40 a
/ b is 2 a % b is 2
Result:
AIM:
To write a program in basic arithmetic programs using embedded C.
SOFTWARE REQUIREMENTS
➢ Keil µvision 4
PROCEDURE:
STEP 1: Double click on µvision 4 icon in the desktop.
STEP 2: Select “New µvision Project” from project in the menu bar.
STEP 3: Browse and create a new project in the required location
STEP 4: Select the target device(here,LPC1768 from NXP) from the list or type the exact name
of the device. Press OK.
STEP 5: Copy start up to Project folder and add to project file”?- Press NO.
STEP 6: In the project window, right click on source and select Add new item to group
“source group1”
STEP 7: Select Asm file and give name of the file with .s extension and press ADD.
STEP 8: Type the program in the editor space and save.
STEP 9: Translate the program by select the icon from tool bar or from menu bar.
STEP 9: Translate the program by select the icon from tool bar or from menu bar.
STEP 10: Check for errors and warnings in the bottom window.
STEP 11: If no error,Select “Build” icon from tool bar or from menu bar.
STEP 12: Start the debug session from Menu bar.
STEP 13: Press OK
STEP 14: Press function key F11 or select “step” option under Debug menu for single step
execution and verify the output in register window/Memory window/xPSR.
THEORY
1. Pre-Increment
When placed before the variable name (also called the pre-increment operator), its value is
incremented instantly. Consider the example: a = ++x;
This example can be expanded to a = (x = x + 1);
2. Post Increment
When it is placed after the variable name (also called post-increment operator), its value is
preserved temporarily until the execution of this statement and it gets updated before the execution
of the next statement. For example: a = x++;
It can be expanded to
a = x;
x = x + 1;
Decrement Operator in C
The ‘–‘ operator is used to decrement the value of an integer. Just like the increment operator,
the decrement operator can also be used in two ways:
1. Pre-Decrement
When placed before the variable name (also called the pre-decrement operator), its value is
decremented instantly. For example, – – x.
2. Post Decrement
When it is placed after the variable name (also called post-decrement operator), its value is
preserved temporarily until the execution of this statement and it gets updated before the execution
of the next statement. For example, x – –.
Coding of Unary Operators in C
C
// C program to demonstrate working
// of Unary arithmetic
// operators
#include <stdio.h>
int main()
{
int a = 10, b = 4, res;
printf("Post Increment and Decrement\n");
// post-increment example:
// res is assigned 10 only, a is not updated yet
res = a++;
printf("a is %d and result is %d\n", a,
res); // a becomes 11 now
// post-decrement example:
// res is assigned 11 only, a is not updated yet
res = a--;
printf("a is %d and result is %d\n", a,
res); // a becomes 10 now
return 0;
}
Output
Post Increment and Decrement
a is 11 and result is 10 a is 10
and result is 11
Result:
AIM:
In this program explain about how to develop an embedded application using arduino.
SOFTWARE REQUIREMENTS
➢ Arduino IDE software
HARDWARE REQUIREMENTS
➢ Arduino UNO
➢ Breadboard
➢ Jumper wires
➢ Resistor
➢ LED lights
➢ USB cable
PROCEDURE:
STEP 1: Download and install Arduino IDE software
STEP 2: Connect arduino UNO to breadboard
Pin 6 → 35
Pin 7 → 40
Pin 8 → 45
STEP 3: 3 Resistor are connected in breadboard
3 LED lights are connected in breadboard
STEP 4: Write a program
STEP 5: Debug the program. You will see all LED lights are on
CODING:
.
EX.NO:06 Interfacing Arduino to Zigbee module
DATE:
AIM:
To write a program in interface XBee module with Arduino Uno board.
HARDWARE REQUIREMENTS
➢ 1 x Arduino Uno
➢ 2 x XBee Pro S2C modules (any other model can be used)
➢ 1 x Xbee explorer board (optional)
➢ 1 x Xbee Breakout board (optional)
➢ USB cables
➢ LEDs
SOFTWARE REQUIREMENTS
➢ Arduino IDE
➢ XCTUSoftware
PROCEDURE:
Connections:
Step 1:- Now, click on the search button. This will show you all the RF devices connected with
your laptop. In our case, it will show only one XBee module.
Step 2:- Select the Serial port of the Explorer board/Arduino board and click on Next.
Step 3:- In the next window, set the USB port parameters as shown below and click on Finish.
Step 4:- Select the Discovered device and click on Add selected device. This process will add your
XBee module to XCTU dashboard.
Step 5:- Now, you can configure your XBee module in this window. Use either AT commands or put
the data manually. As you can see, there is R showing on the left panel which means Xbee is in router
mode. We have to make it Coordinator for the transmitter part. First, update the Firmware by clicking on
the Update firmware
.
Step 6:- Choose the Product family of your device which is available on back of XBee module. Select
function set and firmware version as highlighted below and click on Update.
Step 7:- Now, you have to give ID, MY and DL data to make connection with other XBee. ID
remain same for both the modules. Only MY and DL data interchange i.e. MY for the receiver
XBee becomes DL of the transmitter XBee (coordinator) and DL for the receiver XBee
becomes MY of the transmitter XBee. Make CE as Coordinator and then hit the Write
button. As shown below.
Step 9:- Now, our XBee modules are ready to interface with the Arduino board. We will connect
the transmitter XBee to the laptop and receiver XBee with the Arduino board.
Then give commands to the receiver part using laptop.
PROGRAM:
RESULT:
Successfully write a program in interface XBee module with Arduino Uno board.
EX.NO:07 Interfacing Arduino to GSM module
DATE:
AIM
To write a program in interface arduino to GSM module.
HARDWARE REQUIREMENTS
➢ Arduino UNO
➢ 2G SIM
➢ 12V Power supply
➢ 900 GSM module
➢ Jumper wires
SOFTWARE REQUIREMENTS
➢ Arduino IDE
PROCEDURE:
PROGRAM
Output
Result
HARDWARE REQUIREMENTS
SOFTWARE REQUIREMENTS
➢ Arduino IDE
PROCEDURE
Step 1: Connection
Output
Result
AIM:
To write a program to implement LED blinking application using Raspberry Pi.
HARDWARE REQUIREMENTS:
➢ Raspberry Pi 3 Model B
➢ 5mm LED x 1
➢ 1KΩ Resistor (1/4 Watt) x 1
➢ Mini Breadboard x 1
➢ Connecting wires
➢ Miscellaneous (Computer, Ethernet cable, Power Supply for Raspberry Pi etc.)
SOFTWARE REQUIREMENTS:
➢ Vim Editor(Command Line Editor) Login in to your Raspberry Pi using SSH
PROCEDURE:
Step 1: Connect the LED to the Raspberry Pi.
Step 2: Anode of the LED is connected to the 3.3V supply pin of the Raspberry Pi through the
1KΩ resistor.
Step 3: The cathode of the LED is connected to GPIO25 (Physical Pin 22).
Step 4: To install the Vim Editor (by default, Raspbian has Vi editor and to get full features of
Vim)
Step 5: Enter the following code in the SSH Terminal
sudo apt-get install vim
Step 6: Now open a blank Python file using Vim editor with the file name being blinkLed.py. Step
7: Use the following command
sudo vim blinkLed.py
Step 8: Save the blinkLed.py file and close the Vim Editor. To check the code, use the following
command in the SSH Terminal (Putty).
sudo python blinkLed.py
Step 9: Finally LED should blink at an interval of 1 second
CODING:
OUTPUT:
RESULT:
Successfully implemented LED blinking application using Raspberry Pi.
EX.NO:10 Interfacing sensors to Raspberry PI
DATE:
AIM:
To write a program how to interface IR sensor with Raspberry Pi.
HARDWARE REQUIREMENTS
➢ Raspberry Pi
➢ Breadboard
➢ IR sensor
➢ Jumper wires
SOFTWARE REQUIREMENTS
➢ Raspberry pi VNC viewer
PROCEDURE
Step 1: To place the IR sensor in to breadboard
Step 2: IR sensor→ Raspberry Pi OUT→ pin 8
GND→pin 39
VCC→pin 2
Step 3:To connect Raspberry pi and system Step 4: Write a program and run the script Step 5:
You will see the output in shell monitor
PROGRAM
Output
RESULT
Successfully implement to IR sensor with Raspberry
EX.NO:11 Communicate between Arduino and Raspberry PI using any wireless
DATE: medium
AIM:
To Write a program to wireless Communication between Arduino & Raspberry Pi using
LoRa Module SX1278.
HARDWARE REQUIREMENTS:
➢ Raspberry Pi 4
➢ Arduino Uno
➢ SX1278 433MHz LoRa Transmitter- Receiver Module
➢ DHT11
SOFTWARE REQUIREMENTS:
➢ Cayene IoT platform Raspberry pi
PROCEDURE:
3.3V 3.3V
GND GND
NSS D10
DIO0 D2
SCK D13
MISO D12
MOSI D11
RST D9
VCC 3.3V
GND GND
DATA A0
3.3V 3.3V
Ground Ground
GPIO 10 MOSI
GPIO 9 MISO
GPIO 11 SCK
GPIO 4 DIO 0
GPIO 17 DIO 1
GPIO 18 DIO 2
GPIO 27 DIO 3
GPIO 22 RST
Step 7: You should see the temperature and humidity values received in pi though the shell
window.
PROGRAM:
Arduino Code:
#include <SPI.h> #include <RH_RF95.h> #include "DHT.h"
#define DHTPIN A0 // what pin we're connected to #define DHTTYPE DHT11 // DHT type
DHT dht(DHTPIN, DHTTYPE);
int hum; //Stores humidity value int temp; //Stores temperature value RH_RF95 rf95; void
setup()
{
Serial.begin(9600); dht.begin();
if (!rf95.init()) Serial.println("init failed");
// Defaults after init are 434.0MHz, 13dBm, Bw = 125 kHz, Cr = 4/5, Sf = 128chips/symbol, CRC
on
}
void loop()
{
temp = dht.readTemperature(); hum = dht.readHumidity();
String humidity = String(hum); //int to String String temperature = String(temp);
String data = temperature + humidity; Serial.print(data); char
d[5];
data.toCharArray(d, 5); //String to char array Serial.println("Sending to rf95_server");
rf95.send(d, sizeof(d)); rf95.waitPacketSent();
delay(400);
}
Output:
Result:
Software Requirements:
Google cloud platform
Procedure:
Step 4: Click the name of the service account to open the settings. Then click “KEYS” => “ADD
KEY” => “Create new key” => “JSON” to create a key.
Step 7: the following query expressions will all find our log:
# No equal sign or colon:
"This is a warning!"# with equal sign: jsonPayload.message
= "This is a warning!"# with colon:
jsonPayload.message : "This is"# A more explicit one with logical operators:
jsonPayload.message = "This is a warning!"
logName: "python"
Step 8: use the log_struct method:
json_payload = {"message": "This is a warning from
'python_application_name'!"}
logger.log_struct(json_payload, severity=severity.WARNING)
Step 9: To delete the temporary project after you have finished.
Program:
*setup_logging*
import logging
import google.cloud.logging
client = google.cloud.logging.Client()
# Alternatively, but not recommended. It's helpful when you can't set an environment variable.
service_key_path = "/home/lynn/Downloads/temp-project-for-logging-ff33f97cf72f.json" client
= google.cloud.logging.Client.from_service_account_json(service_key_path)
client.setup_logging()
logging.warning("This is a warning!")
*built-in logging module and add the handlers to a logger create from it*
import logging import
google.cloud.logging
from google.cloud.logging.handlers import CloudLoggingHandler log_name =
"python_application_name"
# Create a handler for Google Cloud Logging. gcloud_logging_client =
google.cloud.logging.Client() gcloud_logging_handler =
CloudLoggingHandler( gcloud_logging_client, name=log_name
)
# Create a stream handler to log messages to the console. stream_handler =
logging.StreamHandler() stream_handler.setLevel(logging.WARNING) # Now
create a logger and add the handlers: logger = logging.getLogger(log_name)
logger.setLevel(logging.DEBUG) logger.addHandler(gcloud_logging_handler)
logger.addHandler(stream_handler) *Google Logging:*
In [1]: logger.info("This is DEBUG.") In [2]: logger.info("This is INFO.")
In [3]: logger.warning("This is WARNING.") # This is WARNING. In [4]:
logger.error("This is ERROR.") # This is ERROR.
Output:
All messages were sent to Google Logging, but only some are printed in the console.
Result:
Successfully write a program Google Cloud Logging and to check the logs in the Logs Explorer.
EX.NO:13 Log Data using Raspberry PI and upload to the cloud platform
DATE:
Aim:
To write a program to log data using Raspberry pi and upload to the cloud platform.
Hardware Requirements:
➢ Raspberry Pi
➢ Power Cable
Software Requirements:
➢ Raspberry pi
➢ Thingspeak IOT platform
Procedure:
Step 3: After clicking on “New Channel”, enter the Name and Description of the data you want
to upload on this channel. For example I am sending my CPU data (temperature), so I named it
as CPU data.
After this click on save channel button to save your details.
Now copy your “Write API Key”. We will use this API key in our code.
Output:
AIM:
To write a program to develop a commercial IOT application.
HARDWARE REQUIREMENTS:
➢ NodeMCU ESP8266 Board or Wemos D1 Mini
➢ BME680 Sensor
➢ Connecting Wires
➢ Breadboard
➢ Micro-USB Cable
SOFTWARE REQUIREMENTS:
➢ Arduino IDE tool
PROCEDURE:
Step 1: Connect Wemos D1 Mini or ESP8266 & BME680 Sensor.
Connect the BME680 SCL & SDA Pin to D4 & D3 of Wemos Board. Supply the sensor as 3.3V
VCC through 3.3V Pin of Wemos Board.
Step 2: Connect the SDO to GND. Connecting the SDO pin from the BME680 to the GND is
important because the original code was programmed to use the alternative I2C address (0x77).
Access this I2C address from the BME680 sensor by connecting the SDO pin to the Ground.
Step 3:
CODING:
#include "bsec.h" #include <Blynk.h>
#include <ESP8266WiFi.h> #include <BlynkSimpleEsp8266.h> char auth[] =
"***********************"; // You should get Auth Token in the Blynk App. char ssid[]
= "***********************"; // Your WiFi credentials. char pass[] =
"***********************";
// Helper functions declarations void checkIaqSensorStatus(void); void errLeds(void); //
Create an object of the class Bsec Bsec iaqSensor;
String output;
// Entry point for the example void setup(void)
{
Serial.begin(115200); Wire.begin(0, 2);
iaqSensor.begin(BME680_I2C_ADDR_PRIMARY, Wire);
output = "\nBSEC library version " + String(iaqSensor.version.major) + "." +
String(iaqSensor.version.minor) + "." + String(iaqSensor.version.major_bugfix) + "." +
String(iaqSensor.version.minor_bugfix);
Serial.println(output); checkIaqSensorStatus(); bsec_virtual_sensor_t sensorList[10] = {
BSEC_OUTPUT_RAW_TEMPERATURE,
BSEC_OUTPUT_RAW_PRESSURE, BSEC_OUTPUT_RAW_HUMIDITY,
BSEC_OUTPUT_RAW_GAS, BSEC_OUTPUT_IAQ, BSEC_OUTPUT_STATIC_IAQ,
BSEC_OUTPUT_CO2_EQUIVALENT, BSEC_OUTPUT_BREATH_VOC_EQUIVALENT,
BSEC_OUTPUT_SENSOR_HEAT_COMPENSATED_TEMPERATURE,
BSEC_OUTPUT_SENSOR_HEAT_COMPENSATED_HUMIDITY,
};
iaqSensor.updateSubscription(sensorList, 10, BSEC_SAMPLE_RATE_LP);
checkIaqSensorStatus(); // Print the header
output = "Timestamp [ms], raw temperature [°C], pressure [hPa], raw relative humidity [%], gas
[Ohm], IAQ, IAQ accuracy, temperature [°C], relative humidity [%], Static IAQ, CO2
equivalent, breath VOC equivalent";
Serial.println(output);
}
// Function that is looped forever void loop(void)
{
unsigned long time_trigger = millis();
if (iaqSensor.run()) { // If new data is available output = String(time_trigger);
output += ", " + String(iaqSensor.rawTemperature); output += ", " + String(iaqSensor.pressure);
output += ", " + String(iaqSensor.rawHumidity); output += ", " +
String(iaqSensor.gasResistance); output += ", " + String(iaqSensor.iaq);
output += ", " + String(iaqSensor.iaqAccuracy); output += ", " + String(iaqSensor.temperature);
output += ", " + String(iaqSensor.humidity); output += ", " + String(iaqSensor.staticIaq); output
+= ", " + String(iaqSensor.co2Equivalent);
output += ", " + String(iaqSensor.breathVocEquivalent); Serial.println(output);
if (iaqSensor.bme680Status != BME680_OK)
{
if (iaqSensor.bme680Status < BME680_OK)
{
output = "BME680 error code : " + String(iaqSensor.bme680Status); Serial.println(output); for
(;;)
errLeds(); /* Halt in case of failure */
} else
{
output = "BME680 warning code : " + String(iaqSensor.bme680Status);
Serial.println(output);
}
}
}
void errLeds(void)
{
pinMode(LED_BUILTIN, OUTPUT);
digitalWrite(LED_BUILTIN, HIGH); delay(100); digitalWrite(LED_BUILTIN, LOW);
delay(100);
}
OUTPUT:
RESULT:
Successfully create a IOT application.
VIVA QUESTIONS
1) What is Arduino?
Arduino is an open-source electronics platform based on easy-to-use hardware and software.
Arduino boards are able to read inputs - light on.
12) What are the most common uses for Raspberry Pi?
1. Desktop PC. Using Raspberry Pi, the microSD card, and a power supply, a simple desktop can be
made. ...
2. Wireless print server. ...
3. Media Usage. ...
4. Game Servers. ...
5. Retro Gaming Machine. ...
6. Robot Controller. ...
7. Stop Motion Camera. ...
8. Time-lapse CameraCCombiningge.