View Single Post
  #4   Spotlight this post!  
Unread 11-02-2011, 16:44
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,112
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: how do i wire the vi's in the teleop vi to program bttons to the arm

Quote:
Originally Posted by Ian McShane View Post
motor or servo move when you press a button,...
Motors and servos are two entirely different things.

If you want a servo to move, you have to change the PWM value you're sending to it. That's usually done using the Servo Set Angle function. It will go to the commanded location and stay there until you change the PWM value again. To power a servo, you must install the "servo power" jumper next to the PWM connector on the Digital Sidecar.

What motor are you intending to control? Will you want to be able to vary its speed, or will it be sufficient to have it change from off to full speed one way or the other? Simple on/off control can be done using a Spike relay module. To have variable speed, you must use a Jaguar or Victor speed controller. Note that the CIM and Fisher Price motors can't be controlled using a relay; they MUST be connected to a speed controller.

Do you know how to read the value of a button?
Do you know how to define a motor using the Motor Open and SetRefNum functions?
Do you know how to use the Motor GetRefNum and Set Output function?


Finally, have you ever looked at the tutorials on the http://www.frcmastery.com/ web site? I think they'd help you a lot.
Reply With Quote