I'm new to Arduino (ex-PIC programmer). (1) I'd like to know how Arduino users set their PWM period. The tutorials and videos I've seen thus far only deal with duty cycle modification. For servo control, typically 20ms is the required period. (2) Additionally, any suggestions on how to go about multiple control servo control with Arduino? I'm sure there are a couple of blokes with experience in this department. Thanks
Usually people would use the servo library. Since it is a class you can actually asign as many as you want under the limit of each bord capability.
ash901226: Usually people would use the servo library.
You're referring to the interrupt driven Servo library for Arduino using 16 bit timers? If I'm not mistaken the period is set at 20ms for the user by:
define REFRESH_INTERVAL 20000 // minumim time to refresh servos in microseconds
Yeah, the servo library takes care of everything. Besides answers on your other thread,
one thing not mentioned is the servo library for 328 chips can handle only 12 servos,
whereas the Mega2560 bds can handle 2X or 3X as many servos.