I have a project that will use the as many servos as I can get working with the Adruino Mega and a sketch written in 2009 called Servo tools for Maya written by Dan Thompson (see link below). The sketch example only allows the use of 4 servos but eludes to the rewrite to allow more, but he does not complete the tutorial on that. After several unsuccessful attempts to contact him, I'm now looking for someone who can change the code for me so that I may be able to use as many servos as a 32 bit windows system will allow on a Mega. Below is a description of what the whole system will accomplish:
Servo Tools For Maya is a Python Plugin that sends rotational values over USB to the Arduino Micro Controller. These values are then converted into Pulse Width Modulation which is used to control multiple Hobby RC Servo Motors.
Applications for the plugin are only limited to your imagination. Some popular examples could be to drive complex animatronic puppetry or kinetic sculpture art installations.
Current Features Include:
- Control up to 4 Servos simultaneously. (see tutorials on how to add support for more)
- High Level GUI for building servoWrite node network.
- Ability to calibrate you servo's range and limits directly from Maya.
- Serial Connection over USB cable to hardware
And here is his short but incomplete attempt to instruct on how to add more than 4 servos to the code:
Greetings,
The maximum servo limit for STFM is hardcoded into the Arduino Sketch. You can see in the code which pins are pre-assigned as default:
29
30
int pinArray[4] = {9, 10, 11, 12}; // digital pins for the servos
The other part of code to take note of is the array contents in void setup() and the number of switch statements in void loop().
Apologies, I have to finish this post later, I am being dragged away to work again watch this space!
That was 2010 no other updates followed. I'm willing to pay to have this code updated. Anyone interested in doing so please contact me privately to discuss. Thanks in advance.