Question
Arduino Programming I need the sensor to regage the temp every 3 minutes. I need to add a condidonal statement that displays a warning on
Arduino Programming
I need the sensor to regage the temp every 3 minutes. I need to add a condidonal statement that displays a warning on the LCD if the temperature is below 65.00 F and another one if it is higher than 82.00 F. Also, a closing statement.
#include "DHT.h" #include "LiquidCrystal.h"
#define DHTPIN 8 #define DHTTYPE DHT11
DHT dht(DHTPIN, DHTTYPE);
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
void setup() { // put your setup code here, to run once: dht.begin(); lcd.begin(16,2); lcd.print("Hello"); lcd.setCursor(5,1); lcd.print("Karen"); delay (1000); lcd.clear(); delay (200); lcd.begin(16,2); lcd.print("The current temp"); lcd.setCursor(0,1); lcd.print("is: "); float f = dht.readTemperature(true); lcd.setCursor(5,1); lcd.print(f); lcd.print(" F");// }
void loop() { delay(10); //put your main code here, to run repeatedly: float f = dht.readTemperature(true); lcd.setCursor(5,1); lcd.print(f); lcd.print(" F"); }
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started