Hi All,
According to the documentation, micros() should work correctly inside a function, however, it gets an error:
../99054d85a0152d95bb704deea92444e371435cad554085c8efbc9ea2910e/the_user_app.cpp: In function 'void calculatePulse()':
../99054d85a0152d95bb704deea92444e371435cad554085c8efbc9ea2910e/the_user_app.cpp:43:22: error: 'micros' was not declared in this scope
make: *** [../99054d85a0152d95bb704deea92444e371435cad554085c8efbc9ea2910e/the_user_app.o] Error 1
The code is as follows:
void calculatePulse()
{
//used to measure time between pulses.
lastTime = pulseTime;
pulseTime = micros();
}
This should technically work, but doesn’t seem to. Anybody have any ideas?
Thanks