Hi I'm trying to do a clock on lcd display that also says the temperature but I'm getting this error
"getTemp" was not declared in this scope
here's the code
#include <LiquidCrystal.h>
#include <FlexiTimer2.h>
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
int tempPin = 4;
float tempVal;
int hour, minute, second;
void setup() {
lcd.begin(16, 2);
startingAnimation();
FlexiTimer2::set(1000, timerInt);
FlexiTimer2::start();
Serial.begin(9600);
Serial.println("Uno e pronto");
Serial.println("Immettere l ora i minuti e i secondi per impostare l orologio");
}
void loop() {
tempVal = getTemp();
if (second >= 60) {
second = 0;
minute++;
if (minute>=60) {
minute = 0;
hour++;
if (hour >= 24) {
hour = 0;
}
}
}
lcdDisplay();
delay(200);
}
void startingAnimation(){
for (int i = 0; i < 16; i++){
lcd.scfollDisplayRight();
}
lcd.print("caricamento...");
for (int i = 0; i < 16; i++){
lcd.scrollDisplayLeft();
delay(300);
}
lcd.clear();
}
void timerInt() {
second++;
}
void serialEvent() {
int inInt[3];
while (Serial.available()) {
for (int i = 0; < 3; i++) {
inInt = Serial.parseInt();
-
Serial.print("Il tuo input e: ");*
-
Serial.print(inInt[0];*
-
Serial.print(", ");*
-
Serial.print(inInt[1]);*
-
Serial.print(", ");*
-
Serial.println(inInt[2]);*
-
hour = inInt[0]*
-
minute = inInt[1];*
-
second = inInt[2];*
-
Serial.print("L ora impostata e: ");*
-
Serial.print(hour / 10);*
-
Serial.print(hour % 10);*
-
Serial.print(':');*
-
Serial.print(minute / 10);*
-
Serial.print(minute % 10);*
-
Serial.print(':');*
-
Serial.print(second / 10);*
-
Serial.println(second % 10);*
-
}*
void lcdDisplay() { -
lcd.setCursor(0, 0);*
lcd.print("Temperatura: ");
lcd.print(tempVal);
lcd.print("C");
lcd.setCursor(0, 1);
lcd.print("Ora: ");
lcd.print(hour / 10);
lcd.print(hour % 10);
lcd.print(':');
lcd.print(minute / 10);
lcd.print(minute % 10);
lcd.print(':');
lcd.print(second / 10);
lcd.print(second % 10);
} -
}*
-
}*
How can I resolve? thanks
P.S. sorry for my bad English