Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Running Vex servos (http://www.chiefdelphi.com/forums/showthread.php?t=63923)

Team 135 12-02-2008 21:22

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

Alan Anderson 12-02-2008 22:11

Re: Running Vex servos
 
Can you define the problem? Specifically, what are you expecting to happen, and what is happening instead?

Team 135 12-02-2008 22:25

Re: Running Vex servos
 
What is happening is nothing at all, what I would like to happen is the servo moving to a position and halt there. I have tested the servo, it works with VEX items it's just the FRC that I won't cooperate with the robot controler.

bear24rw 12-02-2008 22:36

Re: Running Vex servos
 
is it plugged in correctly? and is your backup battery charged?

jgannon 12-02-2008 22:38

Re: Running Vex servos
 
Quote:

Originally Posted by bear24rw (Post 697804)
and is your backup battery charged?

I think this is probably your problem, because your code looks fine. Servos are powered exclusively by the backup battery. If this battery is missing or discharged, then you won't see the expected motion.

Team 135 13-02-2008 18:34

Re: Running Vex servos
 
Ahh, that would make a lot of sense. I did indeed not have a backup battery that was charged. Thanks a lot to you guys for your help.


All times are GMT -5. The time now is 01:00.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi