Need some help with arm not working...

I really don’t know whats going on with the code… the elbow works but the wrist doesn’t… Can I have another set of eyes look over the code to see if there are any overlooked errors? I know when atleast I code Ill always make some little mistake that has me running around in circles for hours trying to find where I mistyped or something like that. This would help us a lot if anyone could find what the problem is…

Code

I am no programmer but are you sure it is not a hardware problem? We have had quick disconnects come loose before and were befuddled until we figured it out.

-Vivek

Can you be more specific? What do you want the wrist to do, how are you trying to make it do that, and what is it doing instead?

We would like the wrist to move with a joystick manually for now but eventually it should move between 6 positions based on an enum and two arrayed ints. we have a pot on the elbow and on the wrist and limit switches to lockout the arm if something moves too far so we will add/subtract 127 and trim to 0-254 based on which way it should go. We have ELBOW_MIN_LIM, WRIST_MIN_LIM, GRIP_LIMIT_OUT and GRIP_LIMIT_IN on the digitals and ELBOW_SENSOR and WRIST_SENSOR on the analogs as 10 turn 100k pots since they are on the motor for better precision.