Hi all !!
I'm very new to lcd codes and i've made a simple thermostat but now i have a problem that I don't know how to make a menu on my LCD.
The menu should have two items so that I can manualy turn two outputs ON and OFF, with 2 buttons ( forward, select) to get to the menu I vould press both buttons.
Can you help me ?
#include <LiquidCrystal.h>
int ledPin = 8;
int TEMPTRIGGER = 25.00;
float temperature = 0;
LiquidCrystal lcd(10, 11, 12, 13, 14, 15, 16);
void setup()
{
pinMode(ledPin, OUTPUT);
lcd.begin(16, 2);
lcd.setCursor(0,0);
lcd.print("Made By Elvis K.");
lcd.setCursor(0,1);
lcd.print("Prosim pocakaj...");
delay(2000);
lcd.clear(); // clear LCD screen
lcd.setCursor(0,0);
lcd.print("Temperatura je: ");
}
void loop()
{
if(temperature >= TEMPTRIGGER) {
digitalWrite( ledPin, HIGH);
delay(100);
digitalWrite( ledPin, LOW);
delay(100);
lcd.setCursor(0,0);
lcd.print(" ALARM ALARM ");
}
else{
digitalWrite( ledPin, LOW);
lcd.setCursor(0,0);
lcd.print("Temperatura je: ");
}
temperature = analogRead(5); /
temperature = temperature +252-500;
temperature = temperature / 10;
delay (100);
lcd.print(" Temperature is ");
lcd.setCursor(0,1);
lcd.print(temperature);
lcd.println(" stop. C. ");
delay(500);
}
Thanks !