Go to Post Defense is a good thing! - Kevin Sheridan [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 02-01-2009, 13:18
Straberrie's Avatar
Straberrie Straberrie is offline
The Plague
AKA: Rebecca
FRC #0375 (Robotic Plague)
Team Role: Programmer
 
Join Date: Feb 2008
Rookie Year: 2007
Location: New York
Posts: 59
Straberrie will become famous soon enough
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!
__________________
Team 375: The Robotic Plague
Current Robot: I-Chihuahua
Last Event: Big Apple Breakaway
  #2   Spotlight this post!  
Unread 02-01-2009, 13:28
tdlrali tdlrali is offline
Registered User
FRC #0469 (Las Guerrillas)
Team Role: Programmer
 
Join Date: Sep 2006
Rookie Year: 2006
Location: MI
Posts: 377
tdlrali has much to be proud oftdlrali has much to be proud oftdlrali has much to be proud oftdlrali has much to be proud oftdlrali has much to be proud oftdlrali has much to be proud oftdlrali has much to be proud oftdlrali has much to be proud of
Thumbs up Re: Servos??? *C++*

Do you have a jumper on the digital sidecar next to the connector to which the servo is connected?
  #3   Spotlight this post!  
Unread 02-01-2009, 14:15
Straberrie's Avatar
Straberrie Straberrie is offline
The Plague
AKA: Rebecca
FRC #0375 (Robotic Plague)
Team Role: Programmer
 
Join Date: Feb 2008
Rookie Year: 2007
Location: New York
Posts: 59
Straberrie will become famous soon enough
Re: Servos??? *C++*



It worked!! TY!!!
__________________
Team 375: The Robotic Plague
Current Robot: I-Chihuahua
Last Event: Big Apple Breakaway
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Servos? PrincessJae Motors 15 26-01-2008 01:33
servos savage Technical Discussion 5 09-04-2005 20:52
servos AlphaOmega870 General Forum 1 21-01-2004 17:37
Servos... Katie Reynolds Motors 8 14-01-2002 08:08


All times are GMT -5. The time now is 19:27.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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