SlideShare a Scribd company logo
//SENDER // It is a helmet that contains a sensor for gases, vital signs in the body, GPS , and a
temperature that transmits data via Lora connecting to arduino nano.
//RECEIVER// arduino nano contains Lora to receive data from sender.
I'm having trouble locating. The location does not appear correctly
also the ID it does not appear correctly it should be W001 but it shown sometimes W262, W81
This is the code below for sender and receiver.
// SENDER
//lora
#include
#include
#define ss 10
#define rst 9
#define dio0 8
//hart
#include
SoftwareSerial a(6,7); //rx-tx
float BPM,SpO2;
//gps
#include "TinyGPS++.h"
#include "SoftwareSerial.h"
SoftwareSerial gpsSerial(2, 3); //arduino 2=GpsTX, 3=GpsRX
TinyGPSPlus gps; //This is the GPS object that will pretty much do all the grunt work
with the NMEA data
float Latitude = 01, Longitude = 01;
float Latitude1;
float Longitude1;
float Latitude2;
float Longitude2;
//temp
#include
#include
#define DHTPIN A4
#define DHTTYPE DHT11
DHT dht(DHTPIN, DHTTYPE);
float temp;
float pro;
float O2;
byte sos;
int ID=1;
int SOS = A3;
byte localAddress = 0xBB;
byte destination = 0xFF;
int E = 0;
int o2 = A1;
int buzzer = 5;
int Vibrationpin = A0;
unsigned long send_delay = 0;
String saved_Latitude = "", saved_Longitude = "";
#include
void setup() {
Serial.begin(9600);
gpsSerial.begin(9600);
a.begin(115200);
delay(100);
Serial.println("BPM Sender");
pinMode(buzzer, OUTPUT);
pinMode(sos, INPUT_PULLUP);
Serial.println("LoRa Sender");
LoRa.setPins(ss, rst, dio0);
if (!LoRa.begin(433E6)) {
Serial.println("Starting LoRa failed!");
while (1)
;
}
Serial.println("LoRa Initializing OK!");
dht.begin();
digitalWrite(buzzer, 1);
delay(250);
digitalWrite(buzzer, 0);
delay(250);
digitalWrite(buzzer, 1);
delay(250);
digitalWrite(buzzer, 0);
delay(250);
}
void loop() {
read_from_a();
temp = dht.readTemperature();
while (gpsSerial.available()) //While there are characters to come from the GPS
{
gps.encode(gpsSerial.read()); //This feeds the serial NMEA data into the library one char at a
time
}
if (gps.location.isUpdated()) //This will pretty much be fired all the time anyway but will at
least reduce it to only after a package of NMEA data comes in
{
//Get the latest info from the gps object which it derived from the data sent by the GPS unit
Latitude = gps.location.lat();
Longitude = gps.location.lng();
/*
Serial.print("Latitude: ");
Serial.print(Latitude);
Serial.print(" Longitude: ");
Serial.println(Longitude);
*/
write_to_memory_lat(String(Latitude, 6));
write_to_memory_lon(String(Longitude, 6));
} else {
//saved_Latitude = read_from_memory_lat();
//saved_Longitude=read_from_memory_lon();
Latitude = read_from_memory_lat();
Longitude = read_from_memory_lon();
Serial.print("saved_Latitude: ");
Serial.print(Latitude, 6);
Serial.print(" saved_Longitude: ");
Serial.println(Longitude, 6);
}
//////////////////////////////////////////////////////////////////////////
if (millis() - send_delay > 2000) {
// send packet
if (isnan(temp)) {
Serial.println(F("Failed to read from DHT sensor!"));
return;
}
//temp=33;
pro = 48;
int MQ=analogRead(A7);
MQ= map(MQ,0,900,100,0);
O2 =MQ;
if ((digitalRead(SOS) == LOW) && (E < 5)) {
E++; Serial.println("SOS.................!");
digitalWrite(buzzer, 1);
delay(200);
digitalWrite(buzzer, 0);
} else {
E = 0;
delay(1500);
{
sos = 0;
}
}
if (E >= 5) {
sos = 5;
digitalWrite(buzzer, 1);
delay(2000);
digitalWrite(buzzer, 0);
}
Serial.println("ID:W00" + String(ID));
Serial.println("E: " + String(E));
Serial.println("sos: " + String(sos));
Serial.println("O2: " + String(MQ));
Serial.print("temp:"); Serial.println(temp);
if (MQ < 60) {
digitalWrite(buzzer, 1);
delay(150);
digitalWrite(buzzer, 0);
}
float f_rounded = ((int)(Latitude * 10) / 10);
Latitude1 = 100 * (Latitude - f_rounded);
float f_rounded2 = ((int)(Latitude1 * 10) / 10);
Latitude2 = 100 * (Latitude1 - f_rounded2);
f_rounded = ((int)(Longitude * 10) / 10);
Longitude1 = 100 * (Longitude - f_rounded);
f_rounded2 = ((int)(Longitude1 * 10) / 10);
Longitude2 = 100 * (Longitude1 - f_rounded2);
// Serial.println(f_rounded);
// Serial.println(Longitude1);
// Serial.println(Longitude2);
String outgoing = String(Latitude,6) + String(Longitude,6) + String(Latitude1) +
String(Longitude1) + String(Latitude2) + String(Longitude2) + String(temp) + String(pro) +
String(O2) + String(sos)+ String(BPM)+ String(SpO2)+ String(ID);
LoRa.beginPacket();
LoRa.write(destination);
LoRa.write(localAddress);
LoRa.write(outgoing.length());
LoRa.write(Latitude);
LoRa.write(Longitude);
LoRa.write(Latitude1);
LoRa.write(Longitude1);
LoRa.write(Latitude2);
LoRa.write(Longitude2);
LoRa.write(temp);
LoRa.write(pro);
LoRa.write(O2);
LoRa.write(sos);
LoRa.write(BPM);
LoRa.write(SpO2);
LoRa.write(ID);
LoRa.endPacket();
send_delay = millis();
}
}
float read_from_memory_lat() {
float x,y,z;
x = EEPROM.read(1); x*=10;
x += EEPROM.read(2);
y = EEPROM.read(3); y*=10;
y += EEPROM.read(4); y*=10;
y += EEPROM.read(5);y*=10;
y += EEPROM.read(6);y*=10;
y += EEPROM.read(7);y*=10;
y += EEPROM.read(8);
y=y/1000000;
z=x+y;
return z;
}
float read_from_memory_lon() {
float x,y,z;
x = EEPROM.read(11); x*=10;
x += EEPROM.read(12);
y = EEPROM.read(13); y*=10;
y += EEPROM.read(14); y*=10;
y += EEPROM.read(15);y*=10;
y += EEPROM.read(16);y*=10;
y += EEPROM.read(17);y*=10;
y += EEPROM.read(18);
y=y/1000000;
z=x+y;
return z;
}
void write_to_memory_lat(String num) {
//xx,xxxxxx
EEPROM.write(1, (num[0] - '0'));
EEPROM.write(2, (num[1] - '0'));
EEPROM.write(3, (num[3] - '0'));
EEPROM.write(4, (num[4] - '0'));
EEPROM.write(5, (num[5] - '0'));
EEPROM.write(6, (num[6] - '0'));
EEPROM.write(7, (num[7] - '0'));
EEPROM.write(8, (num[8] - '0'));
}
void write_to_memory_lon(String num) {
//xx,xxxxxx
EEPROM.write(11, (num[0] - '0'));
EEPROM.write(12, (num[1] - '0'));
EEPROM.write(13, (num[3] - '0'));
EEPROM.write(14, (num[4] - '0'));
EEPROM.write(15, (num[5] - '0'));
EEPROM.write(16, (num[6] - '0'));
EEPROM.write(17, (num[7] - '0'));
EEPROM.write(18, (num[8] - '0'));
}
void read_from_a(){
if(a.available()>0){
String sss=a.readStringUntil('n');
int count=0;
String data="";
for(int i=0;i
#include
#define ss 10
#define rst 9
#define dio0 8
byte localAddress = 0xFF;
float recipient;
String incoming;
byte sender;
byte incomingLength;
float Latitude;
float Longitude;
float Latitude1;
float Longitude1;
float Latitude2;
float Longitude2;
float temp;
float pro;
float O2;
byte sos;
String ID;
float BPM;
float SpO2;
int buzzer = 2;
void setup() {
Serial.begin(9600);
Serial.println("LoRa Receiver");
pinMode(buzzer, OUTPUT);
//Blynk.begin(auth, ssid, pass);
LoRa.setPins(ss, rst, dio0);
// Blynk.virtualWrite(V0, "clr");
if (!LoRa.begin(433E6)) {
Serial.println("Starting LoRa failed!");
while (1);
}
digitalWrite(buzzer, 1); delay(200);
digitalWrite(buzzer, 0); delay(200);
digitalWrite(buzzer, 1); delay(200);
digitalWrite(buzzer, 0); delay(200);
}
void loop() {
int packetSize = LoRa.parsePacket();
if (packetSize == 0) return;
recipient = LoRa.read();
sender = LoRa.read();
incomingLength = LoRa.read();
Latitude = LoRa.read();
Longitude = LoRa.read();
Latitude1 = LoRa.read();
Longitude1 = LoRa.read();
Latitude2 = LoRa.read();
Longitude2 = LoRa.read();
temp = LoRa.read();
pro = LoRa.read();
O2 = LoRa.read();
sos = LoRa.read();
BPM = LoRa.read();
SpO2 = LoRa.read();
ID = LoRa.read();
incoming = String(Latitude) + String(Longitude) + String(Latitude1) + String(Longitude1) +
String(Latitude2) + String(Longitude2) + String(temp) + String(pro) + String(O2) + String(sos)+
String(BPM)+ String(SpO2)+String(ID);
Latitude = Latitude + Latitude1 / 100 + Latitude2 / 10000;
Longitude = Longitude + Longitude1 / 100 + Longitude2 / 10000;
Serial.println("********************************************");
Serial.print("https://www.google.com/maps/place/");// The SMS text you want to send
Serial.print(String(Latitude,6)); // The SMS text you want to send
Serial.print(",");// The SMS text you want to send
Serial.println(String(Longitude, 6)); // The SMS text you want to send
Serial.println("ID:W00" + String(ID));
Serial.println("temp: " + String(temp));
Serial.println("pro: " + String(pro));
Serial.println("O2: " + String(O2));
Serial.println("sos: " + String(sos));
Serial.println("BPM: " + String(BPM));
Serial.println("SpO2: " + String(SpO2));
if (sos == 5) {
Serial.println("Emergency"); digitalWrite(buzzer, 1); delay(550);
digitalWrite(buzzer, 1); delay(250);
digitalWrite(buzzer, 0); delay(550);
digitalWrite(buzzer, 1); delay(250);
digitalWrite(buzzer, 0); delay(550);
digitalWrite(buzzer, 1); delay(250);
digitalWrite(buzzer, 0); delay(550);
}
if (O2 < 60) {
Serial.println("O2 gas"); digitalWrite(buzzer, 1); delay(550);
digitalWrite(buzzer, 1); delay(250);
digitalWrite(buzzer, 0); delay(550);
digitalWrite(buzzer, 1); delay(250);
digitalWrite(buzzer, 0); delay(550);
digitalWrite(buzzer, 1); delay(250);
digitalWrite(buzzer, 0); delay(550);
}
}

More Related Content

Similar to SENDER It is a helmet that contains a sensor for gases, vital s.pdf

Aodv routing protocol code in ns2
Aodv routing protocol code in ns2Aodv routing protocol code in ns2
Aodv routing protocol code in ns2
Prof Ansari
 
GENESIS BOARD MINI SUMO ROBOT PROGRAMFOR 3 OPPONENT SENSOR, .pdf
 GENESIS BOARD MINI SUMO ROBOT PROGRAMFOR 3 OPPONENT SENSOR, .pdf GENESIS BOARD MINI SUMO ROBOT PROGRAMFOR 3 OPPONENT SENSOR, .pdf
GENESIS BOARD MINI SUMO ROBOT PROGRAMFOR 3 OPPONENT SENSOR, .pdf
alltiusind
 
#include IRremote.hint RECV_PIN = 19;const int timer = 600.docx
#include IRremote.hint RECV_PIN = 19;const int timer = 600.docx#include IRremote.hint RECV_PIN = 19;const int timer = 600.docx
#include IRremote.hint RECV_PIN = 19;const int timer = 600.docx
katherncarlyle
 
Cs423 raw sockets_bw
Cs423 raw sockets_bwCs423 raw sockets_bw
Cs423 raw sockets_bw
jktjpc
 
Network security Lab manual
Network security Lab manual Network security Lab manual
Network security Lab manual
Vivek Kumar Sinha
 
How do I draw the Labview code for pneumatic cylinder(air pistion). .pdf
How do I draw the Labview code for pneumatic cylinder(air pistion). .pdfHow do I draw the Labview code for pneumatic cylinder(air pistion). .pdf
How do I draw the Labview code for pneumatic cylinder(air pistion). .pdf
footstatus
 
Jamming attack in wireless network
Jamming attack in wireless networkJamming attack in wireless network
Jamming attack in wireless network
Thesis Scientist Private Limited
 
Unit 6
Unit 6Unit 6
Unit 6siddr
 
What will be quantization step size in numbers and in voltage for th.pdf
What will be quantization step size in numbers and in voltage for th.pdfWhat will be quantization step size in numbers and in voltage for th.pdf
What will be quantization step size in numbers and in voltage for th.pdf
SIGMATAX1
 
robotics presentation for a club you run
robotics presentation for a club you runrobotics presentation for a club you run
robotics presentation for a club you run
SunilAcharya37
 
Sample document
Sample documentSample document
Sample document
arunsethu87
 
Geo distance search with my sql presentation
Geo distance search with my sql presentationGeo distance search with my sql presentation
Geo distance search with my sql presentationGSMboy
 
Gps c
Gps cGps c
Microcontroladores: programas de CCS Compiler.docx
Microcontroladores: programas de CCS Compiler.docxMicrocontroladores: programas de CCS Compiler.docx
Microcontroladores: programas de CCS Compiler.docx
SANTIAGO PABLO ALBERTO
 
ExperiencesSharingOnEmbeddedSystemDevelopment_20160321
ExperiencesSharingOnEmbeddedSystemDevelopment_20160321ExperiencesSharingOnEmbeddedSystemDevelopment_20160321
ExperiencesSharingOnEmbeddedSystemDevelopment_20160321Teddy Hsiung
 
-- Task 2- Debugging a program with stacks- queues- and doubly-linked.docx
-- Task 2- Debugging a program with stacks- queues- and doubly-linked.docx-- Task 2- Debugging a program with stacks- queues- and doubly-linked.docx
-- Task 2- Debugging a program with stacks- queues- and doubly-linked.docx
Adamq0DJonese
 
codings related to avr micro controller
codings related to avr micro controllercodings related to avr micro controller
codings related to avr micro controller
Syed Ghufran Hassan
 

Similar to SENDER It is a helmet that contains a sensor for gases, vital s.pdf (20)

Aodv routing protocol code in ns2
Aodv routing protocol code in ns2Aodv routing protocol code in ns2
Aodv routing protocol code in ns2
 
GENESIS BOARD MINI SUMO ROBOT PROGRAMFOR 3 OPPONENT SENSOR, .pdf
 GENESIS BOARD MINI SUMO ROBOT PROGRAMFOR 3 OPPONENT SENSOR, .pdf GENESIS BOARD MINI SUMO ROBOT PROGRAMFOR 3 OPPONENT SENSOR, .pdf
GENESIS BOARD MINI SUMO ROBOT PROGRAMFOR 3 OPPONENT SENSOR, .pdf
 
#include IRremote.hint RECV_PIN = 19;const int timer = 600.docx
#include IRremote.hint RECV_PIN = 19;const int timer = 600.docx#include IRremote.hint RECV_PIN = 19;const int timer = 600.docx
#include IRremote.hint RECV_PIN = 19;const int timer = 600.docx
 
Cs423 raw sockets_bw
Cs423 raw sockets_bwCs423 raw sockets_bw
Cs423 raw sockets_bw
 
Network security Lab manual
Network security Lab manual Network security Lab manual
Network security Lab manual
 
How do I draw the Labview code for pneumatic cylinder(air pistion). .pdf
How do I draw the Labview code for pneumatic cylinder(air pistion). .pdfHow do I draw the Labview code for pneumatic cylinder(air pistion). .pdf
How do I draw the Labview code for pneumatic cylinder(air pistion). .pdf
 
Jamming attack in wireless network
Jamming attack in wireless networkJamming attack in wireless network
Jamming attack in wireless network
 
Npc13
Npc13Npc13
Npc13
 
Unit 6
Unit 6Unit 6
Unit 6
 
What will be quantization step size in numbers and in voltage for th.pdf
What will be quantization step size in numbers and in voltage for th.pdfWhat will be quantization step size in numbers and in voltage for th.pdf
What will be quantization step size in numbers and in voltage for th.pdf
 
robotics presentation for a club you run
robotics presentation for a club you runrobotics presentation for a club you run
robotics presentation for a club you run
 
Sample document
Sample documentSample document
Sample document
 
Geo distance search with my sql presentation
Geo distance search with my sql presentationGeo distance search with my sql presentation
Geo distance search with my sql presentation
 
StewartPlatform_cpp
StewartPlatform_cppStewartPlatform_cpp
StewartPlatform_cpp
 
Gps c
Gps cGps c
Gps c
 
Microcontroladores: programas de CCS Compiler.docx
Microcontroladores: programas de CCS Compiler.docxMicrocontroladores: programas de CCS Compiler.docx
Microcontroladores: programas de CCS Compiler.docx
 
ExperiencesSharingOnEmbeddedSystemDevelopment_20160321
ExperiencesSharingOnEmbeddedSystemDevelopment_20160321ExperiencesSharingOnEmbeddedSystemDevelopment_20160321
ExperiencesSharingOnEmbeddedSystemDevelopment_20160321
 
-- Task 2- Debugging a program with stacks- queues- and doubly-linked.docx
-- Task 2- Debugging a program with stacks- queues- and doubly-linked.docx-- Task 2- Debugging a program with stacks- queues- and doubly-linked.docx
-- Task 2- Debugging a program with stacks- queues- and doubly-linked.docx
 
Npc14
Npc14Npc14
Npc14
 
codings related to avr micro controller
codings related to avr micro controllercodings related to avr micro controller
codings related to avr micro controller
 

More from alertshoeshingkimand

Ships provide maritime transport services but emit polluting gases s.pdf
Ships provide maritime transport services but emit polluting gases s.pdfShips provide maritime transport services but emit polluting gases s.pdf
Ships provide maritime transport services but emit polluting gases s.pdf
alertshoeshingkimand
 
Short essayThe next step in effective argumentation is the ability.pdf
Short essayThe next step in effective argumentation is the ability.pdfShort essayThe next step in effective argumentation is the ability.pdf
Short essayThe next step in effective argumentation is the ability.pdf
alertshoeshingkimand
 
Share your results from taking Organizational Culture Assessment Ins.pdf
Share your results from taking Organizational Culture Assessment Ins.pdfShare your results from taking Organizational Culture Assessment Ins.pdf
Share your results from taking Organizational Culture Assessment Ins.pdf
alertshoeshingkimand
 
Seth named his wife, Monique, who is age 57, as the sole beneficiary.pdf
Seth named his wife, Monique, who is age 57, as the sole beneficiary.pdfSeth named his wife, Monique, who is age 57, as the sole beneficiary.pdf
Seth named his wife, Monique, who is age 57, as the sole beneficiary.pdf
alertshoeshingkimand
 
se�or. y se�ora Una vez que ambos tienen 62 a�os, presentan una decl.pdf
se�or. y se�ora Una vez que ambos tienen 62 a�os, presentan una decl.pdfse�or. y se�ora Una vez que ambos tienen 62 a�os, presentan una decl.pdf
se�or. y se�ora Una vez que ambos tienen 62 a�os, presentan una decl.pdf
alertshoeshingkimand
 
Sessizlik, Damgalanma ve Akl Hastal Madeline Halpert ve Eva Rosenfel.pdf
Sessizlik, Damgalanma ve Akl Hastal Madeline Halpert ve Eva Rosenfel.pdfSessizlik, Damgalanma ve Akl Hastal Madeline Halpert ve Eva Rosenfel.pdf
Sessizlik, Damgalanma ve Akl Hastal Madeline Halpert ve Eva Rosenfel.pdf
alertshoeshingkimand
 
Set residents strategy to always defect and invaders strategy to t.pdf
Set residents strategy to always defect and invaders strategy to t.pdfSet residents strategy to always defect and invaders strategy to t.pdf
Set residents strategy to always defect and invaders strategy to t.pdf
alertshoeshingkimand
 
Service Values1. I build strong relationships and create Ritz-Carl.pdf
Service Values1. I build strong relationships and create Ritz-Carl.pdfService Values1. I build strong relationships and create Ritz-Carl.pdf
Service Values1. I build strong relationships and create Ritz-Carl.pdf
alertshoeshingkimand
 
send SERIALWISE with headings In F2021, the charity trained 19,591.pdf
send SERIALWISE with headings In F2021, the charity trained 19,591.pdfsend SERIALWISE with headings In F2021, the charity trained 19,591.pdf
send SERIALWISE with headings In F2021, the charity trained 19,591.pdf
alertshoeshingkimand
 
September 21, 2022Russia�s war against Ukraine is causing tremendo.pdf
September 21, 2022Russia�s war against Ukraine is causing tremendo.pdfSeptember 21, 2022Russia�s war against Ukraine is causing tremendo.pdf
September 21, 2022Russia�s war against Ukraine is causing tremendo.pdf
alertshoeshingkimand
 
Self-awareness involves being aware of different aspects of the self.pdf
Self-awareness involves being aware of different aspects of the self.pdfSelf-awareness involves being aware of different aspects of the self.pdf
Self-awareness involves being aware of different aspects of the self.pdf
alertshoeshingkimand
 
Select one theory from the following categories Sociological Syste.pdf
Select one theory from the following categories Sociological Syste.pdfSelect one theory from the following categories Sociological Syste.pdf
Select one theory from the following categories Sociological Syste.pdf
alertshoeshingkimand
 
Select one of the scenarios below and address the following Describ.pdf
Select one of the scenarios below and address the following Describ.pdfSelect one of the scenarios below and address the following Describ.pdf
Select one of the scenarios below and address the following Describ.pdf
alertshoeshingkimand
 
Select all correct statements related to the contribution of scienti.pdf
Select all correct statements related to the contribution of scienti.pdfSelect all correct statements related to the contribution of scienti.pdf
Select all correct statements related to the contribution of scienti.pdf
alertshoeshingkimand
 
Seleccione todas las afirmaciones que se aplican al proceso de pre.pdf
Seleccione todas las afirmaciones que se aplican al proceso de pre.pdfSeleccione todas las afirmaciones que se aplican al proceso de pre.pdf
Seleccione todas las afirmaciones que se aplican al proceso de pre.pdf
alertshoeshingkimand
 
Seleccione un tema de liderazgo relevante y de actualidad de los med.pdf
Seleccione un tema de liderazgo relevante y de actualidad de los med.pdfSeleccione un tema de liderazgo relevante y de actualidad de los med.pdf
Seleccione un tema de liderazgo relevante y de actualidad de los med.pdf
alertshoeshingkimand
 
Seleccione el orden correcto para los siguientes eventos clave en la.pdf
Seleccione el orden correcto para los siguientes eventos clave en la.pdfSeleccione el orden correcto para los siguientes eventos clave en la.pdf
Seleccione el orden correcto para los siguientes eventos clave en la.pdf
alertshoeshingkimand
 
Security analysis Perform security analysis on your proposed ransom.pdf
Security analysis Perform security analysis on your proposed ransom.pdfSecurity analysis Perform security analysis on your proposed ransom.pdf
Security analysis Perform security analysis on your proposed ransom.pdf
alertshoeshingkimand
 
Se realiz� un estudio que muestra que el politetrafluoroetileno (PFO.pdf
Se realiz� un estudio que muestra que el politetrafluoroetileno (PFO.pdfSe realiz� un estudio que muestra que el politetrafluoroetileno (PFO.pdf
Se realiz� un estudio que muestra que el politetrafluoroetileno (PFO.pdf
alertshoeshingkimand
 
Sean Bedan a senior employee and was fired after he reported how a f.pdf
Sean Bedan a senior employee and was fired after he reported how a f.pdfSean Bedan a senior employee and was fired after he reported how a f.pdf
Sean Bedan a senior employee and was fired after he reported how a f.pdf
alertshoeshingkimand
 

More from alertshoeshingkimand (20)

Ships provide maritime transport services but emit polluting gases s.pdf
Ships provide maritime transport services but emit polluting gases s.pdfShips provide maritime transport services but emit polluting gases s.pdf
Ships provide maritime transport services but emit polluting gases s.pdf
 
Short essayThe next step in effective argumentation is the ability.pdf
Short essayThe next step in effective argumentation is the ability.pdfShort essayThe next step in effective argumentation is the ability.pdf
Short essayThe next step in effective argumentation is the ability.pdf
 
Share your results from taking Organizational Culture Assessment Ins.pdf
Share your results from taking Organizational Culture Assessment Ins.pdfShare your results from taking Organizational Culture Assessment Ins.pdf
Share your results from taking Organizational Culture Assessment Ins.pdf
 
Seth named his wife, Monique, who is age 57, as the sole beneficiary.pdf
Seth named his wife, Monique, who is age 57, as the sole beneficiary.pdfSeth named his wife, Monique, who is age 57, as the sole beneficiary.pdf
Seth named his wife, Monique, who is age 57, as the sole beneficiary.pdf
 
se�or. y se�ora Una vez que ambos tienen 62 a�os, presentan una decl.pdf
se�or. y se�ora Una vez que ambos tienen 62 a�os, presentan una decl.pdfse�or. y se�ora Una vez que ambos tienen 62 a�os, presentan una decl.pdf
se�or. y se�ora Una vez que ambos tienen 62 a�os, presentan una decl.pdf
 
Sessizlik, Damgalanma ve Akl Hastal Madeline Halpert ve Eva Rosenfel.pdf
Sessizlik, Damgalanma ve Akl Hastal Madeline Halpert ve Eva Rosenfel.pdfSessizlik, Damgalanma ve Akl Hastal Madeline Halpert ve Eva Rosenfel.pdf
Sessizlik, Damgalanma ve Akl Hastal Madeline Halpert ve Eva Rosenfel.pdf
 
Set residents strategy to always defect and invaders strategy to t.pdf
Set residents strategy to always defect and invaders strategy to t.pdfSet residents strategy to always defect and invaders strategy to t.pdf
Set residents strategy to always defect and invaders strategy to t.pdf
 
Service Values1. I build strong relationships and create Ritz-Carl.pdf
Service Values1. I build strong relationships and create Ritz-Carl.pdfService Values1. I build strong relationships and create Ritz-Carl.pdf
Service Values1. I build strong relationships and create Ritz-Carl.pdf
 
send SERIALWISE with headings In F2021, the charity trained 19,591.pdf
send SERIALWISE with headings In F2021, the charity trained 19,591.pdfsend SERIALWISE with headings In F2021, the charity trained 19,591.pdf
send SERIALWISE with headings In F2021, the charity trained 19,591.pdf
 
September 21, 2022Russia�s war against Ukraine is causing tremendo.pdf
September 21, 2022Russia�s war against Ukraine is causing tremendo.pdfSeptember 21, 2022Russia�s war against Ukraine is causing tremendo.pdf
September 21, 2022Russia�s war against Ukraine is causing tremendo.pdf
 
Self-awareness involves being aware of different aspects of the self.pdf
Self-awareness involves being aware of different aspects of the self.pdfSelf-awareness involves being aware of different aspects of the self.pdf
Self-awareness involves being aware of different aspects of the self.pdf
 
Select one theory from the following categories Sociological Syste.pdf
Select one theory from the following categories Sociological Syste.pdfSelect one theory from the following categories Sociological Syste.pdf
Select one theory from the following categories Sociological Syste.pdf
 
Select one of the scenarios below and address the following Describ.pdf
Select one of the scenarios below and address the following Describ.pdfSelect one of the scenarios below and address the following Describ.pdf
Select one of the scenarios below and address the following Describ.pdf
 
Select all correct statements related to the contribution of scienti.pdf
Select all correct statements related to the contribution of scienti.pdfSelect all correct statements related to the contribution of scienti.pdf
Select all correct statements related to the contribution of scienti.pdf
 
Seleccione todas las afirmaciones que se aplican al proceso de pre.pdf
Seleccione todas las afirmaciones que se aplican al proceso de pre.pdfSeleccione todas las afirmaciones que se aplican al proceso de pre.pdf
Seleccione todas las afirmaciones que se aplican al proceso de pre.pdf
 
Seleccione un tema de liderazgo relevante y de actualidad de los med.pdf
Seleccione un tema de liderazgo relevante y de actualidad de los med.pdfSeleccione un tema de liderazgo relevante y de actualidad de los med.pdf
Seleccione un tema de liderazgo relevante y de actualidad de los med.pdf
 
Seleccione el orden correcto para los siguientes eventos clave en la.pdf
Seleccione el orden correcto para los siguientes eventos clave en la.pdfSeleccione el orden correcto para los siguientes eventos clave en la.pdf
Seleccione el orden correcto para los siguientes eventos clave en la.pdf
 
Security analysis Perform security analysis on your proposed ransom.pdf
Security analysis Perform security analysis on your proposed ransom.pdfSecurity analysis Perform security analysis on your proposed ransom.pdf
Security analysis Perform security analysis on your proposed ransom.pdf
 
Se realiz� un estudio que muestra que el politetrafluoroetileno (PFO.pdf
Se realiz� un estudio que muestra que el politetrafluoroetileno (PFO.pdfSe realiz� un estudio que muestra que el politetrafluoroetileno (PFO.pdf
Se realiz� un estudio que muestra que el politetrafluoroetileno (PFO.pdf
 
Sean Bedan a senior employee and was fired after he reported how a f.pdf
Sean Bedan a senior employee and was fired after he reported how a f.pdfSean Bedan a senior employee and was fired after he reported how a f.pdf
Sean Bedan a senior employee and was fired after he reported how a f.pdf
 

Recently uploaded

Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
MIRIAMSALINAS13
 
How to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERPHow to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERP
Celine George
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
siemaillard
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
beazzy04
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Thiyagu K
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
Thiyagu K
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
EverAndrsGuerraGuerr
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
RaedMohamed3
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
Jisc
 
Polish students' mobility in the Czech Republic
Polish students' mobility in the Czech RepublicPolish students' mobility in the Czech Republic
Polish students' mobility in the Czech Republic
Anna Sz.
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
Celine George
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
JosvitaDsouza2
 
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxStudents, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
EduSkills OECD
 
Ethnobotany and Ethnopharmacology ......
Ethnobotany and Ethnopharmacology ......Ethnobotany and Ethnopharmacology ......
Ethnobotany and Ethnopharmacology ......
Ashokrao Mane college of Pharmacy Peth-Vadgaon
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
Atul Kumar Singh
 
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptxMARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
bennyroshan06
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
Sandy Millin
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
Jisc
 
PART A. Introduction to Costumer Service
PART A. Introduction to Costumer ServicePART A. Introduction to Costumer Service
PART A. Introduction to Costumer Service
PedroFerreira53928
 

Recently uploaded (20)

Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
 
How to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERPHow to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERP
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
 
Polish students' mobility in the Czech Republic
Polish students' mobility in the Czech RepublicPolish students' mobility in the Czech Republic
Polish students' mobility in the Czech Republic
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
 
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxStudents, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
 
Ethnobotany and Ethnopharmacology ......
Ethnobotany and Ethnopharmacology ......Ethnobotany and Ethnopharmacology ......
Ethnobotany and Ethnopharmacology ......
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
 
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptxMARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
 
PART A. Introduction to Costumer Service
PART A. Introduction to Costumer ServicePART A. Introduction to Costumer Service
PART A. Introduction to Costumer Service
 

SENDER It is a helmet that contains a sensor for gases, vital s.pdf

  • 1. //SENDER // It is a helmet that contains a sensor for gases, vital signs in the body, GPS , and a temperature that transmits data via Lora connecting to arduino nano. //RECEIVER// arduino nano contains Lora to receive data from sender. I'm having trouble locating. The location does not appear correctly also the ID it does not appear correctly it should be W001 but it shown sometimes W262, W81 This is the code below for sender and receiver. // SENDER //lora #include #include #define ss 10 #define rst 9 #define dio0 8 //hart #include SoftwareSerial a(6,7); //rx-tx float BPM,SpO2; //gps #include "TinyGPS++.h" #include "SoftwareSerial.h" SoftwareSerial gpsSerial(2, 3); //arduino 2=GpsTX, 3=GpsRX TinyGPSPlus gps; //This is the GPS object that will pretty much do all the grunt work with the NMEA data float Latitude = 01, Longitude = 01; float Latitude1; float Longitude1; float Latitude2; float Longitude2; //temp #include #include #define DHTPIN A4 #define DHTTYPE DHT11
  • 2. DHT dht(DHTPIN, DHTTYPE); float temp; float pro; float O2; byte sos; int ID=1; int SOS = A3; byte localAddress = 0xBB; byte destination = 0xFF; int E = 0; int o2 = A1; int buzzer = 5; int Vibrationpin = A0; unsigned long send_delay = 0; String saved_Latitude = "", saved_Longitude = ""; #include void setup() { Serial.begin(9600); gpsSerial.begin(9600); a.begin(115200); delay(100); Serial.println("BPM Sender"); pinMode(buzzer, OUTPUT); pinMode(sos, INPUT_PULLUP); Serial.println("LoRa Sender"); LoRa.setPins(ss, rst, dio0); if (!LoRa.begin(433E6)) { Serial.println("Starting LoRa failed!"); while (1) ; } Serial.println("LoRa Initializing OK!"); dht.begin(); digitalWrite(buzzer, 1);
  • 3. delay(250); digitalWrite(buzzer, 0); delay(250); digitalWrite(buzzer, 1); delay(250); digitalWrite(buzzer, 0); delay(250); } void loop() { read_from_a(); temp = dht.readTemperature(); while (gpsSerial.available()) //While there are characters to come from the GPS { gps.encode(gpsSerial.read()); //This feeds the serial NMEA data into the library one char at a time } if (gps.location.isUpdated()) //This will pretty much be fired all the time anyway but will at least reduce it to only after a package of NMEA data comes in { //Get the latest info from the gps object which it derived from the data sent by the GPS unit Latitude = gps.location.lat(); Longitude = gps.location.lng(); /* Serial.print("Latitude: "); Serial.print(Latitude); Serial.print(" Longitude: "); Serial.println(Longitude); */ write_to_memory_lat(String(Latitude, 6)); write_to_memory_lon(String(Longitude, 6)); } else { //saved_Latitude = read_from_memory_lat(); //saved_Longitude=read_from_memory_lon(); Latitude = read_from_memory_lat(); Longitude = read_from_memory_lon(); Serial.print("saved_Latitude: ");
  • 4. Serial.print(Latitude, 6); Serial.print(" saved_Longitude: "); Serial.println(Longitude, 6); } ////////////////////////////////////////////////////////////////////////// if (millis() - send_delay > 2000) { // send packet if (isnan(temp)) { Serial.println(F("Failed to read from DHT sensor!")); return; } //temp=33; pro = 48; int MQ=analogRead(A7); MQ= map(MQ,0,900,100,0); O2 =MQ; if ((digitalRead(SOS) == LOW) && (E < 5)) { E++; Serial.println("SOS.................!"); digitalWrite(buzzer, 1); delay(200); digitalWrite(buzzer, 0); } else { E = 0; delay(1500); { sos = 0; } } if (E >= 5) { sos = 5; digitalWrite(buzzer, 1); delay(2000); digitalWrite(buzzer, 0);
  • 5. } Serial.println("ID:W00" + String(ID)); Serial.println("E: " + String(E)); Serial.println("sos: " + String(sos)); Serial.println("O2: " + String(MQ)); Serial.print("temp:"); Serial.println(temp); if (MQ < 60) { digitalWrite(buzzer, 1); delay(150); digitalWrite(buzzer, 0); } float f_rounded = ((int)(Latitude * 10) / 10); Latitude1 = 100 * (Latitude - f_rounded); float f_rounded2 = ((int)(Latitude1 * 10) / 10); Latitude2 = 100 * (Latitude1 - f_rounded2); f_rounded = ((int)(Longitude * 10) / 10); Longitude1 = 100 * (Longitude - f_rounded); f_rounded2 = ((int)(Longitude1 * 10) / 10); Longitude2 = 100 * (Longitude1 - f_rounded2); // Serial.println(f_rounded); // Serial.println(Longitude1); // Serial.println(Longitude2); String outgoing = String(Latitude,6) + String(Longitude,6) + String(Latitude1) + String(Longitude1) + String(Latitude2) + String(Longitude2) + String(temp) + String(pro) + String(O2) + String(sos)+ String(BPM)+ String(SpO2)+ String(ID); LoRa.beginPacket(); LoRa.write(destination); LoRa.write(localAddress); LoRa.write(outgoing.length()); LoRa.write(Latitude); LoRa.write(Longitude); LoRa.write(Latitude1); LoRa.write(Longitude1);
  • 6. LoRa.write(Latitude2); LoRa.write(Longitude2); LoRa.write(temp); LoRa.write(pro); LoRa.write(O2); LoRa.write(sos); LoRa.write(BPM); LoRa.write(SpO2); LoRa.write(ID); LoRa.endPacket(); send_delay = millis(); } } float read_from_memory_lat() { float x,y,z; x = EEPROM.read(1); x*=10; x += EEPROM.read(2); y = EEPROM.read(3); y*=10; y += EEPROM.read(4); y*=10; y += EEPROM.read(5);y*=10; y += EEPROM.read(6);y*=10; y += EEPROM.read(7);y*=10; y += EEPROM.read(8); y=y/1000000; z=x+y; return z; } float read_from_memory_lon() { float x,y,z; x = EEPROM.read(11); x*=10; x += EEPROM.read(12); y = EEPROM.read(13); y*=10; y += EEPROM.read(14); y*=10; y += EEPROM.read(15);y*=10;
  • 7. y += EEPROM.read(16);y*=10; y += EEPROM.read(17);y*=10; y += EEPROM.read(18); y=y/1000000; z=x+y; return z; } void write_to_memory_lat(String num) { //xx,xxxxxx EEPROM.write(1, (num[0] - '0')); EEPROM.write(2, (num[1] - '0')); EEPROM.write(3, (num[3] - '0')); EEPROM.write(4, (num[4] - '0')); EEPROM.write(5, (num[5] - '0')); EEPROM.write(6, (num[6] - '0')); EEPROM.write(7, (num[7] - '0')); EEPROM.write(8, (num[8] - '0')); } void write_to_memory_lon(String num) { //xx,xxxxxx EEPROM.write(11, (num[0] - '0')); EEPROM.write(12, (num[1] - '0')); EEPROM.write(13, (num[3] - '0')); EEPROM.write(14, (num[4] - '0')); EEPROM.write(15, (num[5] - '0')); EEPROM.write(16, (num[6] - '0')); EEPROM.write(17, (num[7] - '0')); EEPROM.write(18, (num[8] - '0')); } void read_from_a(){ if(a.available()>0){ String sss=a.readStringUntil('n'); int count=0; String data=""; for(int i=0;i #include
  • 8. #define ss 10 #define rst 9 #define dio0 8 byte localAddress = 0xFF; float recipient; String incoming; byte sender; byte incomingLength; float Latitude; float Longitude; float Latitude1; float Longitude1; float Latitude2; float Longitude2; float temp; float pro; float O2; byte sos; String ID; float BPM; float SpO2; int buzzer = 2; void setup() { Serial.begin(9600); Serial.println("LoRa Receiver"); pinMode(buzzer, OUTPUT); //Blynk.begin(auth, ssid, pass); LoRa.setPins(ss, rst, dio0); // Blynk.virtualWrite(V0, "clr"); if (!LoRa.begin(433E6)) { Serial.println("Starting LoRa failed!"); while (1); } digitalWrite(buzzer, 1); delay(200); digitalWrite(buzzer, 0); delay(200);
  • 9. digitalWrite(buzzer, 1); delay(200); digitalWrite(buzzer, 0); delay(200); } void loop() { int packetSize = LoRa.parsePacket(); if (packetSize == 0) return; recipient = LoRa.read(); sender = LoRa.read(); incomingLength = LoRa.read(); Latitude = LoRa.read(); Longitude = LoRa.read(); Latitude1 = LoRa.read(); Longitude1 = LoRa.read(); Latitude2 = LoRa.read(); Longitude2 = LoRa.read(); temp = LoRa.read(); pro = LoRa.read(); O2 = LoRa.read(); sos = LoRa.read(); BPM = LoRa.read(); SpO2 = LoRa.read(); ID = LoRa.read(); incoming = String(Latitude) + String(Longitude) + String(Latitude1) + String(Longitude1) + String(Latitude2) + String(Longitude2) + String(temp) + String(pro) + String(O2) + String(sos)+ String(BPM)+ String(SpO2)+String(ID); Latitude = Latitude + Latitude1 / 100 + Latitude2 / 10000; Longitude = Longitude + Longitude1 / 100 + Longitude2 / 10000; Serial.println("********************************************"); Serial.print("https://www.google.com/maps/place/");// The SMS text you want to send Serial.print(String(Latitude,6)); // The SMS text you want to send Serial.print(",");// The SMS text you want to send Serial.println(String(Longitude, 6)); // The SMS text you want to send Serial.println("ID:W00" + String(ID)); Serial.println("temp: " + String(temp)); Serial.println("pro: " + String(pro)); Serial.println("O2: " + String(O2));
  • 10. Serial.println("sos: " + String(sos)); Serial.println("BPM: " + String(BPM)); Serial.println("SpO2: " + String(SpO2)); if (sos == 5) { Serial.println("Emergency"); digitalWrite(buzzer, 1); delay(550); digitalWrite(buzzer, 1); delay(250); digitalWrite(buzzer, 0); delay(550); digitalWrite(buzzer, 1); delay(250); digitalWrite(buzzer, 0); delay(550); digitalWrite(buzzer, 1); delay(250); digitalWrite(buzzer, 0); delay(550); } if (O2 < 60) { Serial.println("O2 gas"); digitalWrite(buzzer, 1); delay(550); digitalWrite(buzzer, 1); delay(250); digitalWrite(buzzer, 0); delay(550); digitalWrite(buzzer, 1); delay(250); digitalWrite(buzzer, 0); delay(550); digitalWrite(buzzer, 1); delay(250); digitalWrite(buzzer, 0); delay(550); } }