Thank you for explaining this function. I have got an encoder signal from a slow running motor, and I guess a way could be to measure the time between pulses using this micros function. I guess some hardware counter is used and you read that counter by micros. I looked in the hardware description for ATmega328P, but could not identify this counter. Do you know the name of this counter?
Very nice and very useful. Thanks for sharing.
for the time to be displayed more accurate you have to use the dtostrf() function which converts the float/double to a string iirc
Tres bien! You are very good at explaining a principle very clearly. Thank you.
Thank you for explaining this function. I have got an encoder signal from a slow running motor, and I guess a way could be to measure the time between pulses using this micros function. I guess some hardware counter is used and you read that counter by micros. I looked in the hardware description for ATmega328P, but could not identify this counter. Do you know the name of this counter?
you can also write this: Serial.print(String("Duration: ") + (duration));
that makes it a little more tidy
You are a true legends!
Thank you Sir🙏