I would like to create servo code that allows the Arduino to set multiple servos in parallel. The code in the servo library is somewhat opaque though.
write() calls writeMicroseconds(). Microseconds calls cli() to turn off interrupts, but I don't see it doing any changes to the pin itself.
I can't find where it actually puts out a pulse. But I saw elsewhere on this forum (http://forum.arduino.cc/index.php/topic,10537.0.html) that pwm could be assigned in hardware directly to pins.
- Can I program the pin to turn on for the appropriate duration, and off, without further CPU involvement?
- Is it ok if the pin keeps on doing the same thing over and over? I don't really know the pulse requirements of a servomotor. Does the pulse have to go just once?
- Why is the current Servo class blocking? Does it have to be for some reason I don't know?