Software concept for robot arm control...

Hi all... I think this would go here... anyway

I'd like to build a servo-based robot arm, containing 4 or 5 servos. The idea is to control it via accelerometer. That is, your accelerometer sensor would sense up down left and right and move the end effector in the appropriate direction.

Sounds simple enough, but the problem is complicated by the angles of the servo joints needing to be calculated to provide the end effector with the correct position modification.

I don't really know how to begin coding this. I thought perhaps my program would need to recognize a 3D cube type field... imagine 30x30x30 x, y, and z. each block therein would have an address that when reached via modification of the accelerometers position the servos would try to put the end effector there.

Can anyone give me any directions to go? I think I need to talk to a math genius :(

After thinking about it for a while I think that certain servos on the arm are going to have more of a influence on certain axis' for instance on the Y axis (height) only the "lifting" servos would be considered, where as anyones that rotate the arm assembly (X) would not.

Argh.. confusing... ideas?

hmm thinking some more... what if I had an array for each x,y,z location block... that any time the arm was directed to that block, arduino looks up the appropriate angles and tells the servos where to go... would take some figuring out ahead of time but it would work...