Question: we need to design a medica device. Please read the number of requirements and write the code based on the component connection to the Arduino

we need to design a medica device. Please read the number of requirements and write the code based on the component connection to the Arduino
1.) The device shall output a message to the Serial Monitor to prompt the user to start it. This message should include a disclaimer to the user, reminding them of what the working parameters of the device are.
2.) The device shall output its status to an external screen, i.e. not the Serial Monitor. This can include options such as Waiting to start,Working.../ Measuring..., and so on. Results from measurements should also be displayed on this screen.
3.) The device shall measure a users skin resistance and shall display that on an external screen. If the skin resistance increases above a certain threshold value, to be determined empirically, the device shall measure and display the current air temperature and air humidity.
4.) If the skin resistance has increased above the threshold value, AND the current air temperature is above the comfortable threshold value, to be determined empirically, the shall open a window/start a fan by moving a motor to an ON position. The device should indicate this is happening by a displaying a message on the external screen for no less than five (5) seconds).
5.) If the current air temperature decreases below the comfortable threshold value, or the user moves/stands up, the device shall close the window/stop the fan by moving the motor to an OFF position. The device should indicate this is happening by a displaying a message on the external screen for no less than five (5) seconds).
The components of the device connected to my Arduino the Grove Shield board and the codes to help you write the Arduino code better. But if you see they are not correct don't write them . the initial pins for each components is from our lab session. The libraries that I added under each componates should be used in the Ardiuno codes.
1. One Air quality sensor connected to the A1,
The Arduino code starts with :
#include "Air_Quality_Sensor.h"
AirQualitySensor sensor(A1);
int air_quality;
2. GSR Sensor board with leads connected to the A0,
The code starts with:
const int sensor_pin = A0;
int sensor_value =0;
long sensor_value_average =0;
int i;
// variable for the skin resistance
long skin_resistance =0;
3. One temperature and humidity sensor connected to the pin 2
#include "DHT.h"
#define DHTTYPE DHT11// Sensor type - DHT 11
#define DHTPIN 2// Which pin we are connected to
DHT dht(DHTPIN, DHTTYPE);
float temperature =0.0;
float humidity =0.0;
4. One Servo motor connected to the pin 5
The code stared with :
#include
Servo motor;
int motor_position =0; // This is measured in degrees, initial starting position
5. One Pulse Oximeter sensor connected to the pin 4
6. One Grove Button connected to pin A3 this button can be used for user interaction if required and control the device
const int push_button_pin = A3;
const int timer_button_pin = A4;
7. One Grove 16x2 LCD screen connected to pin 12
7. The Grove LIS3DHTR sensor is connected to the pin 12
The cods stared with ;
#include
#include "rgb_lcd.h"
rgb_lcd lcd;
*//Remember to install the libraries such AirQualitySensor, LCD Screen, temperature and humidity and Servo motor and ...etc

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!