getTemp was not declared in this scope

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

Hi and welcome to the forum! Before you make any more posts, please read how to use the forum. And would you be so kind to alter your post accordingly? Especially the part about code tags. Because I doubt you meant that italic code...

And of course it's not declared ::slight_smile: Where do you think it should come from? It's not part of the Arduino HAL and you never declared it either...

(deleted)

Also, if you notice, a good portion of your code in your post above is in italics. That's because you didn't use code tags as explained in "How to use this forum" which is in the pinned posts at the top of nearly every forum section.

Had your issue been more difficult to diagnose, your code would probably not have compiled for other folks trying to help you out.