0% found this document useful (0 votes)
5 views64 pages

Lec 10

The document outlines the setup and configuration of a smart home monitoring system using ESP8266 and a web server, including router configuration, cloud server setup with ThingSpeak, and sensor connections. It details the programming of multiple ESP8266 devices acting as clients and a server to collect and upload sensor data such as temperature, humidity, light, pulse, and vibration. The document also includes instructions for configuring the Arduino IDE and necessary libraries for the project.
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)
5 views64 pages

Lec 10

The document outlines the setup and configuration of a smart home monitoring system using ESP8266 and a web server, including router configuration, cloud server setup with ThingSpeak, and sensor connections. It details the programming of multiple ESP8266 devices acting as clients and a server to collect and upload sensor data such as temperature, humidity, light, pulse, and vibration. The document also includes instructions for configuring the Arduino IDE and necessary libraries for the project.
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/ 64

Smart Home Monitoring

Using
ESP8266 and Webserver

Thanks to Dr. Manas Khatua

“Try not to become a man of success. Rather become a man of value.” – Albert Einstein
System Diagram

30-08-2023 2
Physical Setup
ThingSpeak cloud server
accessing from a
Laptop/PC/Smartphone

30-08-2023 3
Router Configuration
To Connect with IITG Internet

30-08-2023 4
Router Configuration
 This is TP-Link WiFi Router
 ESP8266 (local server) will connect to this WiFi AP
 Sensor data will be uploaded to ThingSpeak server
through this WiFi AP.

 Login TP-Link WiFi using given IP (192.168.0.1) and password written on its label.
 Do the following:
 Go to Quick Setup and click on Next.
 Choose Operation Mode as Wireless Router and click on Next.
 Select WAN Connection Type as Static IP and click on Next.
 Set the Static IP, Subnet Mask, Default Gateway, Primary DNS Server, Secondary
DNS Server and click on Next.
 Select the radio bands (2.4 GHz and/or 5 GHz) and click on Next.
 Setup the Wireless radio bands selected above and click on Next.
 Confirm the setup by clicking on Save. The router reboots and reconnects.

30-08-2023 5
Cont…

30-08-2023 6
Cont…

30-08-2023 7
Cont…

30-08-2023 8
Cont…

30-08-2023 9
Cont…

30-08-2023 10
Cont…

30-08-2023 11
Cont…

30-08-2023 12
Cont…

********

30-08-2023 13
Cont…

30-08-2023 14
Connecting with Internet

• You should be able to access Internet in your Mobile/Laptop using TP-Link WiFi AP

30-08-2023 15
Cloud Server Configuration
to Access Web Service

30-08-2023 16
Configure to use Cloud Server

• We use ThingSpeak server http://www.thingspeak.com

• First create an user account


• Then create a channel on the ThingSpeak to upload the data

30-08-2023 17
Cont…

30-08-2023 18
Cont…

30-08-2023 19
Cont…

30-08-2023 20
Create Channel Display

• Select Private View of the


created channel.

• Click Add Widgets

• Select the Numeric Display


widget, and then set the
display options.

30-08-2023 21
API Key and Channel ID

• To send data to ThingSpeak, we need unique write API key and Channel ID, which
will be used later in code to upload the data to ThingSpeak website

• Click on “API Keys” button to get your unique “Write API Key”
• “Channel ID” is also given on the top
30-08-2023 22
IoT Network Configuration

30-08-2023 23
IoT Network Configuration
• There are total five ESP8266
– one is acting as server,
– other four as clients in local network.

• ESP1- ESP8266 acting as local server


• ESP2- ESP8266 with Light sensor
• ESP3- ESP8266 with Pulse sensor
• ESP4- ESP8266 with vibration sensor
• ESP5- ESP8266 with temperature & humidity sensor

• Note: Unique ID for each ESP will be needed in programming

30-08-2023 24
Sensor Configuration

ESP8266 with LDR Sensor


• Connect VCC pin of LDR sensor with 3V3 pin of ESP2
• Connect GND pin of LDR sensor with GND pin of ESP2
• Connect DATA OUT pin of LDR sensor with A0 pin of ESP2.

ESP8266 with Pulse Sensor


• Connect VCC pin of pulse sensor with 3V3 pin of ESP3
• Connect GND pin of pulse sensor with GND pin of ESP3
• Connect SIGNAL pin of pulse sensor with A0 pin of ESP3

30-08-2023 25
Cont…

ESP8266 with Vibration Sensor


• Connect VCC pin of vibration sensor with VIN pin of ESP4
• Connect GND pin of vibration sensor with GND pin of ESP4
• Connect DATA OUT pin of vibration sensor with A0 pin of ESP4

ESP8266 with Temperature & Humidity Sensor (DHT11)


• Connect VCC pin of DHT11 with VIN pin of ESP5
• Connect DATA OUT pin of DHT11 with D3 pin of ESP5
• Connect GND pin of DHT11 with GND pin of ESP5

30-08-2023 26
Arduino
Tool Configuration

30-08-2023 27
Configure Arduino IDE
• Download and Install Arduino IDE https://www.arduino.cc/en/Main/Software

• When the Arduino IDE first opens, this is what you should see:

30-08-2023 28
Install ESP8266 Board in IDE
• Go to File --> Preferences
• Enter the below URL into Additional Board Manager URLs field and press the “OK” button
http://arduino.esp8266.com/stable/package_esp8266com_index.json OR
https://github.com/esp8266/Arduino/releases/download/2.3.0/package_esp8266com_index.json

30-08-2023 29
Cont…
• Go to Tools > Board > Board Manager

• Scroll down, select the ESP8266 board menu and install “esp8266 by ESP8266
Community”

30-08-2023 30
Cont…

• Select the appropriate board


• Go to Tools >Board > NodeMCU 1.0 (ESP-12E Module)
• Finally, re-open the Arduino IDE

30-08-2023 31
Install Sensor Libraries
• In this demo, we use DHT11 sensor for which we will be using DHT.h
header file in the code. So, this header file should be installed.

• Install Using the Library Manager


– click to Sketch menu then Include Library > Manage Libraries
– Search for “DHT” on the Search box and install the DHT library from Adafruit.

30-08-2023 32
Cont…
• After installing the DHT library from Adafruit, install “Adafruit Unified Sensor” libraries.

• There exist other methods for installing libraries


– Importing a .zip Library
• Sketch --> Include Library --> Add .Zip Library

– Manual Installation of Library


• Download the library as .Zip --> extract it
• Place the files in File --> Preferences --> Sketchbook location
• Restart Arduino IDE

30-08-2023 33
MCU Programming

30-08-2023 34
ESP8266 with Local Server
For ESP5, write the following code in the Arduino IDE and save as Local_Server_ESP1.ino
Install ThingSpeak.h library. Change the red colored text in code according to your setup.

#include <ESP8266WiFi.h> //Including ESP8266 library


#include<ESP8266WebServer.h> //Including ESP8266WebServer library for web server
#include<ThingSpeak.h> //Including ThingSpeak library

IPAddress IP(172,16,117,192); //Static IP address of local server


IPAddress gateway(172,16,112,1); //Gateway of the network
IPAddress mask(255, 255, 248, 0); //Subnet mask of the network
WiFiClient client;
WiFiServer server(80);

unsigned long myChannelNumber = 2244718; //Replace with channelID of ThingSpeak channel ID


const char * myWriteAPIKey = "T4N14GFNKOPDWIWL"; //Replace WriteAPIKey of channel

const char* softAPssid = "ESP1_Server"; //SSID of the hotspot of ESP8266 acting as local server
const char* password = "12345678"; //Password of the hotspot of ESP8266 acting as local server

const char* wifissid = “TP-Link_A522"; //Replace with SSID of WIFI router providing internet access
const char* pass = "12345678"; //Password of WIFI router providing internet access

30-08-2023 35
Cont…
void setup() {
WiFi.mode(WIFI_AP_STA); //station mode and access point mode both at the same time
Serial.begin(9600); //Serial communication at baud rate of 9600 for debugging purpose
delay(100);
Serial.println(WiFi.getMode());
Serial.print("Configuring SoftAP....");
Serial.println(WiFi.softAPConfig(IP, gateway, mask)? "Ready" : "Failed");
delay(10);
Serial.println("Setting SoftAP...");
Serial.println(WiFi.softAP(softAPssid, password));
delay(10); • Two functions exist in the
Serial.println(WiFi.softAPIP());
delay(500); programme: setup () and loop ()
WiFi.begin(wifissid, pass); • setup(): This function runs once
while(WiFi.status()!=WL_CONNECTED) { when ESP first boots
Serial.print("."); • loop(): This function reads the LDR
delay(500);
} sensor value and connects to local
Serial.print("Connected to Wifi with ssid "); server then send sends data to
Serial.println(wifissid); local server
Serial.print("WiFi IP address: ");
Serial.println(WiFi.localIP()); // WIFI router IP address
ThingSpeak.begin(client);
server.begin(); //Start local server
}

30-08-2023 36
Cont…
void loop() {
Serial.printf("Stations connected = %d\n", WiFi.softAPgetStationNum());
WiFiClient client = server.available(); //Waiting for the incoming data if client is ready to send
if (!client) {return;}
String select_fun = client.readStringUntil('\r'); //Reads the ESP8266 ID (of clients)

if(select_fun==“5") { //If ESP5 sends the data


String temp = client.readStringUntil('\r'); //Reads the temperature value
String Humidity = client.readStringUntil('\r'); //Reads the humidity value
//Upload the temp value to ThingSpeak server as first field of channel

ThingSpeak.writeField(myChannelNumber, 1, temp, myWriteAPIKey);


delay(15000); //Wait for 15 sec after one entry
//Upload the humidity value to ThingSpeak server as second field of channel

ThingSpeak.writeField(myChannelNumber, 2, Humidity, myWriteAPIKey);


Serial.print("Temperature: ");
Serial.print(temp);
Serial.print(" degree celsius, Humidity: ");
Serial.print(Humidity);
Serial.print("%. ");
Serial.println("Sent to ThingSpeak Server...");
}

30-08-2023 37
Cont…
if(select_fun=="2") { //If ESP2 sends the data
String LDRval = client.readStringUntil('\r'); //Reads light sensor value
//Upload the light sensor value to ThingSpeak server as third field of channel
ThingSpeak.writeField(myChannelNumber, 3, LDRval, myWriteAPIKey);
Serial.print("LDR sensor data value: ");
Serial.println(LDRval);
Serial.println("Sent to ThingSpeak Server...");
}
if(select_fun=="3") { //If ESP3 sends the data
String pulseRate = client.readStringUntil('\r'); //Reads pulse rate
//Upload the pulse rate to ThingSpeak server as fourth field of channel
ThingSpeak.writeField(myChannelNumber, 4, pulseRate, myWriteAPIKey);
Serial.print("Pulse rate: ");
Serial.print(pulseRate);
Serial.println(" BPM. Sent to ThingSpeak Server..");
}
if(select_fun=="4"){ //If ESP4 sends the data
String Vibval = client.readStringUntil('\r'); //Reads vibration sensor data
//Upload the vibration sensor data value to ThingSpeak server as fifth field of channel
ThingSpeak.writeField(myChannelNumber, 5, Vibval, myWriteAPIKey);
Serial.print("Vibration Sensor data: ");
Serial.print(Vibval);
Serial.println(" Sent to ThingSpeak server..");
}
delay(15000); //waits for 15 secs after each transmission
}

30-08-2023 38
ESP8266 with LDR Sensor
For ESP2, write the following code in the Arduino IDE and save as LDR_client.ino

#include<ESP8266WiFi.h> // Including ESP8266 library

char ssid[]="ESP1_Server"; //Network ssid of hotspot of local server


char pass[]="12345678"; // Password of hotspot of local server
int val;
int LDRpin = A0; //LDR Pin Connected to A0 pin
IPAddress server(172,16,117,192); // IP address of local server
WiFiClient client;

• Change the IP address of Local Server (i.e. ESP1)


• Change the SSID and Password of WiFi AP hosted in Local Server

• Two functions exist in the programme: setup () and loop ()


• setup(): This function runs once when ESP first boots
• loop(): This function reads the LDR sensor value and connects to local server
then send sends data to local server

30-08-2023 39
Cont…
void setup()
{
Serial.begin(9600); // Serial communication at baud rate of 9600 for debugging purpose
delay(10);
WiFi.mode(WIFI_STA); // ESP8266 in station mode
Serial.print("Connecting to ");
Serial.println(ssid);
WiFi.begin(ssid, pass);
Serial.println();
while (WiFi.status() != WL_CONNECTED)
{
Serial.print(".");
delay(500);
}
Serial.println();
Serial.println("WiFi connected");
Serial.print("LocalIP:"); Serial.println(WiFi.localIP());
Serial.println("MAC:" + WiFi.macAddress());
Serial.print("Gateway:"); Serial.println(WiFi.gatewayIP());
Serial.print("AP MAC:"); Serial.println(WiFi.BSSIDstr()); // MAC address of access point
}

30-08-2023 40
Cont…
void loop()
{
val = analogRead(LDRpin); // Reads the light sensor value
if(client.connect(server,80)) // Connect to local server
{
client.print("2\r"); // before sending data first send ESP8266 ID as 2
Serial.print("LDR sensor value: ");
Serial.println(val);
String LDRval = String(val);
LDRval += "\r"; // Add end delimiter
client.print(LDRval); // Send to local server
Serial.println("Sent to Local Server..");
delay(15000);
}
client.stop();
}

30-08-2023 41
ESP8266 with Pulse Sensor
#define pulsePin A0 // Pulse sensor input pin A0
#include<ESP8266WiFi.h> // Including ESP8266 library

char ssid[] = "ESP1_Server"; // Replace with SSID of hotspot of local server


char pass[] = "12345678"; // Replace with password of hotspot of local server
IPAddress server(172,16,117,192); // IP address of local server
WiFiClient client; For ESP3, write the
following code in the
int rate[10]; // array to hold last ten IBI value Arduino IDE and save as
unsigned long sampleCounter = 0; // used to determine pulse timing
unsigned long lastBeatTime = 0; // used to find IBI Pulse_client.ino
unsigned long lastTime = 0, N;
int BPM = 0; // int that holds raw analog in 0. updated every 2mS
int IBI = 0; // int that holds time interval between beats! Must be seeded!
int P = 512; // used to find peak in pulse wave, seeded
int T = 512; // used to find trough in pulse wave, seeded
int thresh = 512; // used to find instant moment of heart beat, seeded
int amp = 100; // used to hold amplitude of pulse waveform, seeded
int Signal; // holds incoming raw data
boolean Pulse = false; // "True" when heartbeat is detected. "False" when not a "live beat".
boolean firstBeat = true; // used to seed rate array so we startup with reasonable BPM
boolean secondBeat = true; // used to seed rate array so we startup with reasonable BPM
boolean QS = false; // Becomes true when ESP8266 finds a beat

30-08-2023 42
Cont…
void setup()
{
Serial.begin(9600); // Serial communication at baud rate of 9600 for debugging purpose
delay(10);
WiFi.mode(WIFI_STA); // ESP8266 in station mode
Serial.print("Connecting to ");
Serial.println(ssid);
WiFi.begin(ssid, pass);
Serial.println();
while (WiFi.status() != WL_CONNECTED)
{
Serial.print(".");
delay(500);
}
Serial.println();
Serial.println("WiFi connected");
Serial.print("LocalIP:"); Serial.println(WiFi.localIP());
Serial.println("MAC:" + WiFi.macAddress());
Serial.print("Gateway:"); Serial.println(WiFi.gatewayIP());
Serial.print("AP MAC:"); Serial.println(WiFi.BSSIDstr()); // MAC address of access point
}

30-08-2023 43
Cont…
void loop(){
if (QS == true){ //if ESP8266 finds a beat
if (client.connect(server, 80)){ // Connect to local server
client.print("3\r"); // before sending data first send ESP8266 ID as 3
String pulseRate = String(BPM); // Convert into string
pulseRate +="\r"; // Add "r" as end delimiter
Serial.print("Pulse rate: ");
Serial.print(BPM);
Serial.println(" BPM.");
client.print(pulseRate); // send data to local server
Serial.println("Sent to local server..");
}
QS = false;
client.stop();
delay(15000);
}
else if(millis() >= (lastTime + 2)) {
readPulse();
lastTime = millis();
}
}

30-08-2023 44
Cont…
void readPulse() {
Signal = analogRead(pulsePin); //Read pulse sensor value
sampleCounter += 2; // Keeps track of the time in mS
int N = sampleCounter - lastBeatTime; // Monitor the time since the last beat to avoid noise
detectSetHighLow(); // find the peak and trough of the pulse wave
// Now it's time to look for the heart beat
// signal surges up in value every time there is a pulse
if(N > 250){ // avoid high frequency noise
if((Signal > thresh) && (Pulse == false) && (N > (IBI/5)*3))
pulseDetected();
}
if (Signal < thresh && Pulse == true) {
Pulse = false;
amp = P - T;
thresh = amp / 2 + T; void detectSetHighLow() {
P = thresh; if(Signal < thresh && N > (IBI/5)* 3)
T = thresh; // avoid dichrotic noise by waiting 3/5 of last IBI
} {
if (N > 2500) { if (Signal < T) { // T is the trough
thresh = 512; T = Signal; // Keep track of lowest point in pulse wave
P = 512; }
T = 512; }
lastBeatTime = sampleCounter; if (Signal > thresh && Signal > P) // thresh condition helps avoid noise
firstBeat = true; {
secondBeat = true; P = Signal; // P is the peak
} } // Keep track of highest point in pulse wave
} }

30-08-2023 45
Cont…
void pulseDetected()
{
Pulse = true; // set the pulse flag when there is a pulse
IBI = sampleCounter - lastBeatTime; // time between beats in mS
lastBeatTime = sampleCounter; //keep track of time for next pulse
if (firstBeat) // if it's the first time beat is found BPM = 60000 / runningTotal;
{ // how many beats can fit into a minute? that's BPM!
firstBeat = false; //clear firstBeat flag QS = true;
return; if (client.connect(server, 80)) //Connects to local server
} {
if (secondBeat) // if this is second beat client.print("3\r");
{ //before sending the data sends ESP8266 ID as 3
secondBeat = false; // clear secondBeat flag String pulseRate = String(BPM);
for (int i = 0; i <= 9; i++) // Converting integer data into string
{ pulseRate +="\r";
rate[i] = IBI; // Add end Delimiter "r" in the data
} Serial.print("Pulse rate: ");
} Serial.print(BPM);
word runningTotal = 0; // clear the runningTotal variable Serial.println(" BPM.");
for (int i = 0; i <= 8; i++) //Shift data in the rate array client.print(pulseRate); //sends data to locals server
{ Serial.println("Sent to local server..");
rate[i] = rate[i + 1]; // and drop the oldest IBI value }
runningTotal += rate[i]; // add up the 9 oldest IBI value client.stop();
} delay(15000);
rate[9] = IBI; // add the latest IBI to the rate array // Wait for 15 seconds after each transmission
runningTotal += rate[9]; //add the latest IBI to runningTotal }
runningTotal /= 10; // average the last 10 IBI values

30-08-2023 46
ESP8266 with Vibration Sensor
For ESP4, write the following code in the Arduino IDE and save as Vibration_client.ino

#include <ESP8266WiFi.h> // Including ESP8266 library


#define vib A0 // sensor input from A0 pin of ESP8266

char ssid[] = "ESP1_Server"; //Replace with SSID of hotspot of local server


char pass[] = "12345678"; // Replace with password of hotspot of local server

IPAddress server(172,16,117,192); // IP address of local server


WiFiClient client;

• Change the IP address of Local Server (i.e. ESP1)


• Change the SSID and Password of WiFi AP hosted in Local Server

30-08-2023 47
Cont…
void setup(){
Serial.begin(9600); // Serial communication at baud rate of 9600 for debugging purpose
delay(10);
pinMode(vib, INPUT); // Input of vibration sensor
WiFi.mode(WIFI_STA); // ESP8266 as station mode
Serial.print("Connecting to ");
Serial.println(ssid);
WiFi.begin(ssid, pass);
Serial.println();
while (WiFi.status() != WL_CONNECTED) {
Serial.print(".");
delay(500);
}
Serial.println();
Serial.println("WiFi connected");
Serial.print("LocalIP:"); Serial.println(WiFi.localIP()); // IP address of local server
Serial.println("MAC:" + WiFi.macAddress());
Serial.print("Gateway:"); Serial.println(WiFi.gatewayIP());
Serial.print("AP MAC:"); Serial.println(WiFi.BSSIDstr()); // MAC address of access point
}

30-08-2023 48
Cont…
void loop(){
int val = analogRead(vib); // Reads the sensor value
if(client.connect(server,80)) //connects to local server
{
client.print("4\r"); // Before sending the data sends ESP8266 ID as 4
Serial.print("Vibration sensor value: ");
Serial.println(val);
String data = String(val); // Converting integer data into string type
data += "\r"; // Add end delimiter "r" in the data
client.print(data); // sends sensor data to local server
Serial.println("Sent to Local server..!! ");
delay(15000); // After each transmission wait for 15 seconds
client.stop();
}
}

30-08-2023 49
ESP8266 with DHT11 Sensor
For ESP5, write the following code in the Arduino IDE and save as Temp_Humidity_Client.ino

#include<DHT.h> //Including temperature and Humidity sensor library


#include<ESP8266WiFi.h> //Including ESP8266 library
#define DHTPIN 0 // D3 pin of ESP8266

char ssid[] = "ESP1_Server"; //Replace with ssid of hotspot of local server


char pass[] = "12345678"; // Replace with password of hotspot of local server

IPAddress server(172,16,117,192); // Static IP address of local server. Replace whatever you want.
WiFiClient client;

DHT dht(DHTPIN, DHT11); // Data of DHT11 sensor in D3 pin of ESP8266

• Change the IP address of Local Server (i.e. ESP1)


• Change the SSID and Password of WiFi AP hosted in Local Server

• Install the DHT11 library and Adafruit Unified Sensor library for DHT11 sensor
30-08-2023 50
Cont…
void setup() {
Serial.begin(9600); //serial communication at baud rate of 9600 for debugging purpose
delay(10);
dht.begin(); // start Temperature and Humidity sensor
WiFi.mode(WIFI_STA); // ESP8266 mode as station mode
Serial.print("Connecting to ");
Serial.println(ssid);
WiFi.begin(ssid, pass);
Serial.println();
while (WiFi.status() != WL_CONNECTED) {
Serial.print(".");
delay(500);
}
Serial.println();
Serial.println("WiFi connected");
Serial.print("LocalIP:"); Serial.println(WiFi.localIP());
Serial.println("MAC:" + WiFi.macAddress());
Serial.print("Gateway:"); Serial.println(WiFi.gatewayIP());
Serial.print("AP MAC:"); Serial.println(WiFi.BSSIDstr()); // MAC address of access point
}

30-08-2023 51
Cont…
void loop() {
float h = dht.readHumidity(); // Read Humidity value from sensor
float t = dht.readTemperature(); // Read temp value from sensor
if(isnan(h) || isnan(t)) {
Serial.println("Failed to read from DHT sensor"); // Error message
return;
}
if(client.connect(server,80)) // Connect to local server
{
client.print(“5\r"); // before sending the data first send ESP8266 ID as 5
String temp = String(t);
temp += "\r"; // Add “r” as end delimiter
client.print(temp); // send temperature to local server
Serial.print("Temperature: ");
Serial.print(t);
Serial.print(" degree celsius, Humidity: ");
Serial.print(h);
Serial.print("%. ");
String humidity = String(h);
humidity += "\r"; // Add “r” in data as end delimiter
client.print(humidity); // send to Local server
Serial.println("Sent to local server ");
delay(15000); // delay of 15sec after each transmission
}
client.stop();
}

30-08-2023 52
Code Compilation and Upload

30-08-2023 53
Code Compilation

Compilation
successful
message in
bottom left
corner.

30-08-2023 54
Code Uploading
• Plug in the ESP8266 boards one by one to PC/Laptop via USB cable
• Go to Tool menu, select Board “NodeMCU 1.0 (ESP-12E Module)” and Port “COM3”.
• Open the corresponding code and do uploading code in Node MCU.

Note: If COM port is not


detected automatically then
it is needed to install.
Download port drivers from
the given link and then
install and then restart the
system:
https://www.silabs.com/pro
ducts/development-
tools/software/usb-to-uart-
bridge-vcp-drivers

30-08-2023 55
Observe Outputs

30-08-2023 56
Open Serial Monitor
• First select the port (go to Tools > Port: ) to which the board is connected
then click the icon of Serial Monitor on the top right side of the Arduino IDE

Serial Monitor
of Local Server

30-08-2023 57
Cont…

Serial Monitor
of ESP2

Serial Monitor
of ESP3

30-08-2023 58
Cont…

Serial Monitor
of ESP4

Serial Monitor
of ESP5

30-08-2023 59
Results & Graphs in Web
• Open the ThingSpeak page and click on Channels > My channels
• Now select the channel that is created for this experiment (In this case ‘Monitoring
Four Sensors in Star Topology’).

30-08-2023 60
Cont…
• click on ‘Private View’ to see the uploaded data

30-08-2023 61
Cont…
• Temperature and Humidity

30-08-2023 62
Cont…
Light Sensor Pulse Sensor Vibration Sensor

30-08-2023 63
30-08-2023 64

You might also like