Hi at the community,
I have a, hopefully, pretty simple problem, which I simply can’t figure out. I’m trying to compile the following code, but I get this error message: “‘pow’ was not declared in this scope”
I have been looking at the reference documentation and it seems correct to me.
const int irsensorpin = A0;
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
}
void loop(){
// Reads the InfraRed sensor analog values and convert into distance.
double sensorValue = analogRead(irsensorpin);
double IRdistance = 6560.7 * pow(sensorValue, (-0.517));
Serial.println(IRdistance);
// A delay is added for a stable and precise input
delay(500);
}
I have also tried to change the base to a float like this, but I get the same error.
float sensorValue = analogRead(irsensorpin);
Hope you guys can help me 
Regards Mads
