View Single Post
  #1   Spotlight this post!  
Unread 12-02-2008, 21:22
Team 135 Team 135 is offline
Registered User
FRC #0135 (Penn Robotics)
 
Join Date: Jan 2008
Rookie Year: 1998
Location: Mishawaka, Indiana
Posts: 139
Team 135 will become famous soon enough
Question Running Vex servos

I am having trouble running a vex servo using a FRC controller. I assumed that the servos would be able to use a PWM signal and move accordingly. I was wrong. A snippet of the code that I was attempting to use would be the following. Simply I am asking for a bit of code that would fix my problem.
pwm01 = p1_y;

--or--

if (p1_sw_trig == 1){ // Analog input from the Joystick
pwm01 = 255;}
else{
pwm01 = 127;}

( I know that I have unnecessary { }'s )
Anyone have something that would be helpful, any bit of code or wisdom would be greatly appreciated