|
Motor Control Systems
What are people doing to control their motors? Specifically, those dealing with arms and positions (not drive).
What I have going is a set-up that reads an array of structures containg pointers to the PWM values & input variables, analog in for the pot, and all the constants needed. Just before the call to putdata(), this is called to handle all the inputs. This same code is used for both autonomous and user modes.
There is also a debugging advantage to this: If part of arm doesn't work, I can point to another part and say, "That works; the code is fine," because it's the same code with different values.
|