Share 'best way to read a servo signal on arduino'
the atmega168 on the arduino has a timer1 which has input capture capability (see this application note and datasheet for atmega168 for details). using it, it's possible to do the pulse timing in completly in hardware (no errors, no jitter), and having a interupt readout the measured time.
here's the code:
unsigned int serinp; //servo positions
//disable all interupts
You can share this blog post in two ways…
Share this link:
Send it with your computer's email program: Email this