Enter Your Project for a Chance to Win a Thermal Imaging Camera, Germicidal UV Lamp, and a Shopping Cart with Matching Charity Donation! Back to homepage | Project14 Home | |
Monthly Themes | ||
Monthly Theme Poll |
Developed a prototype wearable device that helps in remote monitoring of the health condition of quarantined people such as body temperature along with geolocation signature and can be used to send alert information to concerned officials if the condition of the people shows possible symptoms of COVID-19 or violation of quarantine take place.
COVID-19 viral infections are increasing day by day at a very alarming rate and hundreds of thousands of people suspected of infection or who had contact with COVID-19 positive patients are kept under self-quarantine. Under these circumstances, it has become imperative to monitor the health condition of people under quarantine at regular intervals and isolate them if they exhibit possible symptoms of COVID-19 such as severe cough, sustained higher body temperature, and breathing difficulties. The wearable device, that resembles a smartwatch, continuously measures body temperature using a temperature sensor and logs this information in the device memory along with the geolocation signature of the quarantined person. In addition, the wearable device transmits this information to a cloud server at regular intervals through a cellular mobile network, so that the quarantined people’s health parameters can be remotely monitored and analyzed by Government health authorities based on the data history
This device uses a Particle BORON platform for data processing and to establish connectivity through the cellular mobile network.
SOURCE CODE:
#include <DS18B20.h>
const int MAXRETRY = 3;
const int pinOneWire = D2;
const int pinLED = D7;
const uint32_t msSampleTime = 1000;
const uint32_t msPublishTime = 1000;
const int nSENSORS = 2;
int xRaw;
int yRaw;
int zRaw;
DS18B20 ds18b20(pinOneWire);
retained uint8_t sensorAddresses[nSENSORS][8];
float celsius[nSENSORS] = {NAN, NAN};
void setup() {
pinMode(pinLED, OUTPUT);
ds18b20.resetsearch(); // initialise for sensor search
for (int i = 0; i < nSENSORS; i++) { // try to read the sensor addresses
ds18b20.search(sensorAddresses[i]); // and if available store
}
}
void loop() {
static uint32_t msSample = 0;
static uint32_t msPublish = 0;
xRaw = analogRead(A0);
yRaw = analogRead(A1);
zRaw = analogRead(A2);
if (millis() - msSample >= msSampleTime) {
msSample = millis();
for (int i = 0; i < nSENSORS; i++) {
float temp = getTemp(sensorAddresses[i]);
if (!isnan(temp)) celsius[i] = temp;
}
}
if (millis() - msPublish >= msPublishTime) {
msPublish = millis();
Serial.println("Publishing now.");
publishData();
}
}
double getTemp(uint8_t addr[8]) {
double _temp;
int i = 0;
do {
_temp = ds18b20.getTemperature(addr);
} while (!ds18b20.crcCheck() && MAXRETRY > i++);
if (i < MAXRETRY) {
//_temp = ds18b20.convertToFahrenheit(_temp);
Serial.println(_temp);
}
else {
_temp = NAN;
Serial.println("Invalid reading");
}
return _temp;
}
void publishData() {
char szInfo[64];
snprintf(szInfo, sizeof(szInfo), "%.1f C T1, %.1f C T2, %4d, %4d, %4d", celsius[0], celsius[1], xRaw, yRaw, zRaw);
Particle.publish("Data", szInfo, PRIVATE);
}
Top Comments