I have this bit of code I'm trying to execute only once. but I seem to get this error every time I try to compile: "calcOppervlakte' was not declared in this scope" when it's being called in the setup.
I've looked at code examples where calling functions like this works, and I cannot wrap my head around this problem.
google isn't really helpful either since the search for something-something not declared in this scope gets me thousands of results.
double pi = 3.14159265359;
void setup() {
Serial.begin(9600);
for(int r = 1; r <11; r++){
Serial.print(calcOppervlakte(r)); <----
}
}
void loop() {
}
double calcOpppervlakte(float radius){
double result = pi * pow(radius, 2);
return result;
}