Write down an Arduino program to interface a temperature monitoring system in a public environment which will display information on 16*2 LCD “Fever” if temp is greater than 99.6 degrees and “No fever” if the temp.is below 99.6 degrees. (Use of DHT11, Ultrasonic motion sensor is permissible).
Below is an Arduino program to interface a temperature monitoring system using a DHT11 temperature sensor, an LM35 temperature sensor, and a 16×2 LCD display. The system will display “Fever” if the temperature is greater than 99.6 degrees Fahrenheit and “No fever” if it is below 99.6 degrees Fahrenheit.
const lm35pin=A4;
#include<LiquidCrystal.h>
const int rs=11,en=10,d4=8,d5=7,d6=6,d7=5;
LiquidCrystal lcd(rs,en,d4,d5,d6,d7);
void setup() {
lcd.begin(16,2);
}
void loop() {
int adc= analogRead(lm35pin);
float tempvoltage= adc*4.88;
float tempvalue = tempvoltage/10;
if (tempvalue>99.6)
lcd.print(“Fever”);
else
lcd.print(“No Fever”)
delay(2000);
}
Write Write a program to measure the Air quality Index of a given area using MQ135 gas sensor and to display the information on LCD according to the following conditions:
Below is an Arduino program to measure the Air Quality Index (AQI) of a given area using an MQ-135 gas sensor. The information is displayed on a 16×2 LCD according to the following conditions:
- “Good” if AQI is between 0-50
- “Moderate” if AQI is between 51-100
- “Unhealthy for Sensitive Groups” if AQI is between 101-150
- “Unhealthy” if AQI is between 151-200
- “Very Unhealthy” if AQI is between 201-300
- “Hazardous” if AQI is between 301-500
Components Needed:
- Arduino UNO
- MQ-135 Gas Sensor
- 16×2 LCD Display
- 10kΩ Potentiometer
- Breadboard and Jumper Wires
#include<LiquidCrystal.h>
const int rs=11,en=10,d4=8,d5=7,d6=6,d7=5;
LiquidCrystal lcd(rs,en,d4,d5,d6,d7);
const int mq135pin=A2;
void setup() {
lcd.begin(16,2);
lcd.print(“Air Qulty Val.”);
}
void loop() {
int sensorvalue=analogRead(mq135pin);
int aqi=map(sensorvalue,0,1023,0,500);
lcd.setCursor(0,1);
if(aqi<=50)
lcd.print(“Good”);
else if (aqi<=100)
lcd.print(“Moderate”);
else if (aqi<=150)
lcd.print(“Unhealthy sen”);
else if (aqi<=200)
lcd.print(“Unhealthy”);
else if (aqi<=300)
lcd.print(“Very Unhealthy”);
else
lcd.print(“Hazardos”);
delay(5000);
}
Download O Level Practical PDF: Click Here