New answers tagged

1 vote

Using Internal Timer Interrupt to Read Analog Sensor

First, read Nick Gammon's answer: all his points are perfectly valid. He notes that the serial prints can be quite slow. And indeed, as I counted the characters, I find that the prints should take at ...
Edgar Bonet's user avatar
  • 41.4k
0 votes

Using Internal Timer Interrupt to Read Analog Sensor

For one thing, currentPosition is not declared volatile so the compiler may be keeping that value in a register, which is not consulted inside the ISR. I'm also concerned about all the serial prints ...
Nick Gammon's user avatar
  • 37.6k

Top 50 recent answers are included