Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Non-camera servos in Autonomous (http://www.chiefdelphi.com/forums/showthread.php?t=54361)

Vashts6583 17-02-2007 14:42

Non-camera servos in Autonomous
 
Alo. I wish to have a servo move from 0 to 255 during autonomous mode, but I can't seem to get it to work at all. I've tried just hard-setting it to 255 and also moving it in increments (25 every loop), but neither method seems to work. Anyone have a solution?

Alan Anderson 17-02-2007 19:01

Re: Non-camera servos in Autonomous
 
Servo power is supplied by the 7.2v backup battery. Do you have one installed?

Vashts6583 17-02-2007 19:46

Re: Non-camera servos in Autonomous
 
Yes, we do. I'm just not sure how to run it software-wise.

Also, I tested the autonomous with the dashboard hooked up, and the PWM that I have the servo hooked up to actually DID move to 254, but the servo itself didn't budge at all, yet the servo works with the controls on the OI... I know that the autonomous works with motors....but not with servos.... >_<

Alan Anderson 18-02-2007 00:36

Re: Non-camera servos in Autonomous
 
If it's working in teleop mode but not in autonomous, I'm going to guess that you're using the camera code from Kevin Watson, and your servo is on pwm13, pwm14, pwm15, or pwm16. If I've guessed correctly, read on. If not, I don't know what to tell you.

Kevin included a very nice PWM driver with the camera code. However, he didn't replace all of the original calls to Generate_Pwms() with calls to the new PWM(). Make the change yourself near the end of the autonomous loop.

Vashts6583 18-02-2007 01:05

Re: Non-camera servos in Autonomous
 
Actually, I already did make the change. However, it still didn't work (servo is on PWM 15).

Is moving a servo in autonomous even possible?

jgannon 18-02-2007 01:56

Re: Non-camera servos in Autonomous
 
Quote:

Originally Posted by Vashts6583 (Post 580647)
Is moving a servo in autonomous even possible?

Yes, it is definitely possible, with no fancy tricks required. It sounds like you've got some issues with using PWM 13-16.

paulcd2000 18-02-2007 08:39

Re: Non-camera servos in Autonomous
 
our camera is mounted on 11 and 12. We have absolutly no problems. Try using a different pwm port.

Vashts6583 18-02-2007 12:20

Re: Non-camera servos in Autonomous
 
Alright, I'll give that a shot, and I'll post the results. Thanks

Vashts6583 18-02-2007 12:31

Re: Non-camera servos in Autonomous
 
Thank you very much. I was using PWM 15, and as soon as I changed it to PWM 11 it worked just how it was supposed to.

Best of luck in the competition.


All times are GMT -5. The time now is 10:57.

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