View Single Post
  #1   Spotlight this post!  
Unread 07-02-2011, 15:28
dmitch's Avatar
dmitch dmitch is offline
Chief Head Electrical Guy
AKA: Daniel Mitchell
FRC #1997 (Stag Robotics)
Team Role: Programmer
 
Join Date: Feb 2010
Rookie Year: 2010
Location: Bishop Miege High School
Posts: 142
dmitch is a jewel in the roughdmitch is a jewel in the roughdmitch is a jewel in the roughdmitch is a jewel in the rough
Programming Motors for Arm

I am a rookie programmer this year. Our team is using motors on each arm joint to control the arm position. How do I set it up so that a joystick axis or a joystick button can control a motor? Also, I want to have several "presets" for the arm position so that it will minimize the amount of work our driver has to do. How can I set it up so that, for example, button 1 will align the arm with the top middle peg. I just need to set up something that will say "when button 1 is pressed: run both window motors in their correct directions x degrees and run the second joints motor y degrees at the same time.

Our arm setup is: one arm coming up from chassis, bolted to chassis; at the top of that there is a joint that is controlled by 2 window motors facing opposite directions(that is they need to be run at the same time, one clockwise, one counterclockwise to work the joint); then that arm joint proceeds about 2 feet out and there is another joint there that is run by only 1 motor. then the arm ends in the claw.

Thank You for All Help in Advance, and I prefer pictures but anything will work as long as it explains clearly.
__________________
Reply With Quote