For the X2, could someone please explain how to use the servo controller(not for the motors). What I mean by this is:
1)Does the servo controller work off of pins D0-D7? I’m not quite understanding the schematic.
2)When writing code, do you need to initialize the servos like you need to initialize the MUX for the ADC to read from a certain pin? If so, where could I find an example of how to do that and change the frequency?
Any help would be greatly appreciated. Thanks!
I don’t understand what you mean when you say “the servo controller”. Which servo controller are you referring to? The X2 has built in motor controllers, but it does not have an integrated servo controller. I’m also not sure what you mean by “change the frequency” with regard to servos.
You can use your X2 as a servo controller, but you will have to write the code that does it. Servos are controlled by a train of pulses (usually one pulse every 20ms or so) that typically range from 1 to 2ms in length. The length of the pulse determines the position to which the servo moves (1.5ms is usually the neutral position while 1ms is one extreme and 2ms is the other). You can program your X2 to generate such pulses, or you can buy a servo controller and use the X2 to control that. Servos do not need initialization, but a servo controller might.