in step 5 of void Userinterface::checkSensors() an error occurs saying sensorValue does not name a type. I tried to solve it by defining sensorValue as integer by adding line of code ( int sensorValue = readSensor(); ) however, another error occured saying that 'readSensor' was not declared in this scope. Could you, please, explain how can I solve this?
Temporally, try adding just these lines to Userinterface::checkSensors():
void Userinterface::checkSensors() {
sensorValue = analogRead(sensorPin);
Serial.print("sensorValue="); Serial.println(sensorValue);
}
Does that work? Can you upload it and check the Serial Monitor? Does it print the value for sensorValue?
Since the variables like sensorValue are already defined in the class Userinterface (in Userinterface.h), they should be known. They are class-variables.