Im trying to find a way to enter my code an LCD menu
To enter the temperature and fan settings
#include "DHT.h"
#include <LiquidCrystal.h>
#define DHTPin 2
LiquidCrystal lcd(1, 3, 4, 5, 6, 7);
float tempC;
int fanPin = 8;
int ledrPin = 13;
int ledvPin = 11;
int heatresestancePin = 12;
char buzzer = 9;
DHT dht;
void setup() {
dht.setup(DHTPin);
lcd.begin(16,2);
pinMode(fanPin, OUTPUT);
pinMode(ledrPin, OUTPUT);
pinMode(ledvPin, OUTPUT);
pinMode(heatresestancePin, OUTPUT);
}
void loop() {
float tempC = dht.getTemperature();
float humi = dht.getHumidity();
if (tempC >36)
{
digitalWrite(fanPin, LOW);
digitalWrite(ledvPin, LOW);
digitalWrite(ledrPin, HIGH);
for(int note=700;note<2000;note++)
{
tone(buzzer, note, 125);
delay (1);
}
for(int note=2000;note>=700;note--)
{
tone(buzzer, note, 125);
delay(1);
}
}
else
{
{
digitalWrite(fanPin, HIGH);
digitalWrite(ledvPin, HIGH);
digitalWrite(ledrPin, LOW);
}
if (tempC <37)
{
digitalWrite(heatresestancePin, LOW);
}
else
{
digitalWrite(heatresestancePin, HIGH);
}
lcd.setCursor(0,0);
lcd.print("Temp: ");
lcd.print(tempC);
lcd.print(" C");
lcd.setCursor(0,1);
lcd.print("Humi: ");
lcd.print(humi);
lcd.print(" %");
delay(2000);
}
}