Experiment: University Institute of Engineering Department of Computer Science & Engineering
Experiment: University Institute of Engineering Department of Computer Science & Engineering
EXPERIMENT: 1.2
1. Aim of the practical: Design a Cloud based weather monitoring system using IoT platform
and relevant sensors.
IoT software addresses its key areas of networking and action through platforms, embedded
systems, partner systems, and middleware.
These individual and master applications are responsible for data collection, device integration,
real-time analytics, and application and process extension within the IoT network.
University Institute of Engineering
Department of Computer Science & Engineering
4. Code:
/*21BCS7478
* BMP280 - https://components101.com/sensors/gy-bmp280-module
* PubSubClient - https://github.com/knolleary/pubsubclient
*/
bmp280;
Ubidots client(TOKEN);
Serial.print(topic);
Serial.print("] ");
Serial.print((char)payload[i]);
Serial.println();
void setup() {
Serial.begin(9600);
Serial.println("Init... T2_Weather");
Serial.println("Initializing BMP280");
if (!status) {
Serial.println("Done");
Serial.print(WIFISSID);
Serial.println(WIFIPASS);
client.wifiConnection(WIFISSID, WIFIPASS);
Serial.println("Done");
client.begin(callback);
Serial.println("Done");
Serial.println("DONE");
}
University Institute of Engineering
Department of Computer Science & Engineering
void loop() {
Serial.print("Temperature: ");
Serial.print(temperature); // variable
Serial.println(" °C");
Serial.print("Pressure: ");
Serial.print(pressure); // variable
Serial.println(" Pa");
if (!client.connected()) {
client.reconnect();
client.add("temperature-data", temperature); // Insert your variable Labels and the value to be sent
client.add("pressure-data", pressure);
client.loop();
delay(5000);
}
University Institute of Engineering
Department of Computer Science & Engineering
during some weather hazards. To overcome this problem here the wireless sensors are used to
check and monitor the weather parameters. The other idea is Vertical farming system. It is
implemented for cultivating different crops in small area.
Not any.
University Institute of Engineering
Department of Computer Science & Engineering