0% found this document useful (0 votes)
27 views5 pages

Siya

The document describes an experiment conducted by a student to design a cloud-based weather monitoring system using an ESP32, BMP280 sensor, and Ubidots IoT platform. The student wrote code to connect the BMP280 sensor to an ESP32 and publish sensor data like temperature and pressure to a device on Ubidots. The experiment was successfully completed with the weather monitoring system working as intended and the student learning about using Ubidots and the components of the ESP32 and BMP280 sensor.

Uploaded by

saksham Mehta
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views5 pages

Siya

The document describes an experiment conducted by a student to design a cloud-based weather monitoring system using an ESP32, BMP280 sensor, and Ubidots IoT platform. The student wrote code to connect the BMP280 sensor to an ESP32 and publish sensor data like temperature and pressure to a device on Ubidots. The experiment was successfully completed with the weather monitoring system working as intended and the student learning about using Ubidots and the components of the ESP32 and BMP280 sensor.

Uploaded by

saksham Mehta
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Experiment Title.

2
Student Name: Siya Sharma UID: 22BCS15362
Branch: CSE – General Section/Group: 207-D
Semester: II Date of Performance: 22/02 /23
Subject Name:Disruptive Technologies -2 Subject Code : 22ECH-103

1. Aim: Design a cloud based weather monitoring system using IoT platform and relevant
sensors.

2 .Objective:

1. Pin Configuration Of ESP-32


2. Write Code To Link BMP280.
3. Making A Working Model Of weather monitoring system.

3. Tools used: Arduino, Ubidots, BMP-280, ESP-32..

Working Of ESP32 & BMP280

4. CODE :-

#include <Adafruit_BMP280.h>

#include <UbidotsESPMQTT.h>

#define BMP_SDA 21

#define BMP_SCL 22

#define TOKEN "BBFF-6AW90QhvG5TSmzomsrVqjPfOFHZCNO" // Your Ubidots TOKEN

#define WIFISSID "Redmi Note 10 Pro" // Your SSID

#define WIFIPASS "ad123456" // Your Wifi Pass


Adafruit_BMP280 bmp280;

Ubidots client(TOKEN);

void callback(char* topic, byte* payload, unsigned int length) {

Serial.print("Message arrived [");

Serial.print(topic);

Serial.print("] ");

for (int i = 0; i < length; i++) {

Serial.print((char)payload[i]);

Serial.println();

void setup() {

Serial.begin(9600);

Serial.println("Init... T2_Weather");

Serial.println("Initializing BMP280");

boolean status = bmp280.begin(0x76);

if (!status) {

Serial.println("BMP280 Not connected!");

Serial.println("Done");

Serial.print("Connecting to SSID: ");

Serial.print(WIFISSID);
Serial.print(", Password: ");

Serial.println(WIFIPASS);

client.wifiConnection(WIFISSID, WIFIPASS);

Serial.println("Done");

Serial.println(" Initializing Ubidots Connection...");

client.ubidotsSetBroker("industrial.api.ubidots.com"); // Sets the broker properly for


the business account

client.setDebug(true); // Pass a true or false bool value to


activate debug messages

client.begin(callback);

Serial.println("Done");

Serial.println("DONE");

void loop() {

// Acquiring data from BMP280

float temperature = bmp280.readTemperature();

float pressure = bmp280.readPressure();

Serial.print("Temperature: ");

Serial.print(temperature);

Serial.println(" °C");

Serial.print("Pressure: ");

Serial.print(pressure);

Serial.println(" Pa");
// Establising connection with Ubidots

if (!client.connected()) {

client.reconnect();

// Publising data of both variable to Ubidots

client.add("temperature-data", temperature); // Insert your variable Labels and the


value to be sent

client.add("pressure-data", pressure);

client.ubidotsPublish("weather-monitoring"); // insert your device label here

client.loop();

delay(5000);

5.OutPut:

5. Result/Output/Writing Summary :
In this a Cloud based weather monitoring system, we write the code
for the program called wm and is uploaded the same to the circuit using
Arduino ide. Simultaneously, we made a device on UBIDOTS to store our
data. As a result we see the weather conditions like temperature pressure
altitude and water boiling point And successfully completed the
experiment.

Learning outcomes (What I have learnt):

i) Working of UBIDOTS and BMP280.

ii) Principal behind the cloud based weather monitoring Verify and upload code to circuit.

iii) The components of ESP32 and BMP208.

Evaluation Grid:

Sr. Parameters Marks Obtained Maximum


No. Marks
1. Worksheet completion including 10
writing learning
objectives/Outcomes.(To be
Submitted at the end of the day).
2. VIVA 8
3. Student Engagement in 12
Simulation/Demonstration/Performance
and Controls/Pre-Lab Questions.
Signature of Faculty (with Date): Total Marks
Obtained:

You might also like