Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Servos??? *C++* (http://www.chiefdelphi.com/forums/showthread.php?t=71008)

Straberrie 02-01-2009 13:18

Servos??? *C++*
 
Hey all,

Code:

Servo panservo(1);
       
float servoRange = panservo.GetMaxAngle() - panservo.GetMinAngle();
for(float angle = panservo.GetMinAngle();
        angle < panservo.GetMaxAngle();
        angle += servoRange / 10.0)
{
        panservo.SetAngle(angle);
        Wait(.1);
}

We have a servo plugged into PWM channel 1 on the primary sidecar module, and have this code in the autonomous function but the servo ceases to move. The code is mostly directly out of the programming guide, except for changing the channel number to match our setup. Any ideas/suggestions?

Thanks!

tdlrali 02-01-2009 13:28

Re: Servos??? *C++*
 
Do you have a jumper on the digital sidecar next to the connector to which the servo is connected?

Straberrie 02-01-2009 14:15

Re: Servos??? *C++*
 


:] It worked!! TY!!!:]


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

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