New answers tagged timers
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 ...
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 ...
Top 50 recent answers are included
Related Tags
timers × 438arduino-uno × 135
interrupt × 121
pwm × 50
arduino-mega × 45
atmega328 × 30
programming × 28
millis × 25
time × 23
arduino-nano × 22
isr × 20
library × 17
sensors × 16
led × 16
avr × 16
attiny × 15
rtc × 14
arduino-ide × 13
serial × 12
c++ × 11
arduino-due × 11
frequency × 11
button × 9
power × 8
analogread × 8