Go to Post The culture has shifted, people. You can act shocked and complain, and likely lose the attention of the students you want to reach through FRC and other activities, or you can shift with it, and make FRC relatable and relevant to a bunch of good kids with foul mouths. - mrnoble [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 23-02-2004, 19:30
bstempi bstempi is offline
Captain
#0708 (Hardwired Hatters)
Team Role: Student
 
Join Date: Feb 2004
Location: Horsham, Pa
Posts: 23
bstempi is an unknown quantity at this point
Send a message via AIM to bstempi
How to program servos

That line was it......please help.
~Bstemp
  #2   Spotlight this post!  
Unread 23-02-2004, 19:48
ahecht's Avatar
ahecht ahecht is offline
'Luzer'
AKA: Zan
no team
Team Role: Alumni
 
Join Date: Dec 2001
Rookie Year: 2002
Location: Billerica, MA
Posts: 978
ahecht has a reputation beyond reputeahecht has a reputation beyond reputeahecht has a reputation beyond reputeahecht has a reputation beyond reputeahecht has a reputation beyond reputeahecht has a reputation beyond reputeahecht has a reputation beyond reputeahecht has a reputation beyond reputeahecht has a reputation beyond reputeahecht has a reputation beyond reputeahecht has a reputation beyond repute
Send a message via ICQ to ahecht Send a message via AIM to ahecht Send a message via Yahoo to ahecht
Re: How to program servos

Treat them just like you would a motor, except that instead of outputting a speed from -127 to +127, you are outputting a position from -127 to +127. For fun, you can hook the servo to the PWM outputs for one of your motors, and play with the joystick to get a feel for how they work.
__________________
Zan Hecht

Scorekeeper: '05 Championship DaVinci Field/'10 WPI Regional
Co-Founder: WPI-EBOT Educational Robotics Program
Alumnus: WPI/Mass Academy Team #190
Alumnus (and founder): Oakwood Robotics Team #992


"Life is an odd numbered problem the answer isn't in the back of the book." — Anonymous WPI Student
  #3   Spotlight this post!  
Unread 23-02-2004, 20:51
bstempi bstempi is offline
Captain
#0708 (Hardwired Hatters)
Team Role: Student
 
Join Date: Feb 2004
Location: Horsham, Pa
Posts: 23
bstempi is an unknown quantity at this point
Send a message via AIM to bstempi
Re: How to program servos

didn't work....any possible problems/solutions?
  #4   Spotlight this post!  
Unread 23-02-2004, 22:31
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,112
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: How to program servos

Quote:
Originally Posted by bstempi
didn't work....any possible problems/solutions?
Have you connected a good 7.2v backup battery? That's where the servos get their power.
  #5   Spotlight this post!  
Unread 23-02-2004, 23:45
wun's Avatar
wun wun is offline
Registered User
AKA: David Wolever
#0865 (Warp7)
Team Role: Programmer
 
Join Date: Dec 2003
Rookie Year: 2001
Location: Toronto
Posts: 84
wun will become famous soon enough
Send a message via AIM to wun Send a message via MSN to wun
Re: How to program servos

Quote:
Originally Posted by ahecht
Treat them just like you would a motor, except that instead of outputting a speed from -127 to +127
-127 to +127?
I thought the readings had to be from 0 to 255...
Are you just adding 127 to the outputs at the end of your main loop?
Can you actually use +127 .. -127 and I just havent heard about it?
Quote:
Originally Posted by bstempi
didn't work....any possible problems/solutions?
What didnt work? Did the motors just not move?
If you hook a victor up to the outputs, does the little orange light go solid?
If it dosent, it means that theres a problem with the code (probibly), and if it IS solid orange, and changes from green to red when you change the signal being sent to it (moving the joystick), then your servo is probibly broken.
Also, I read somewhere that last years servos dont work. That might be it.
__________________
Help Microsoft stop piracy. Use Linux!

I have three gmail invitations, message me if you want one
  #6   Spotlight this post!  
Unread 24-02-2004, 08:27
Gene F's Avatar
Gene F Gene F is offline
FIRST Fanatic
AKA: Gene Falendysz
#0343 (Metal in Motion)
Team Role: Engineer
 
Join Date: Mar 2002
Rookie Year: 2001
Location: Oconee County, SC
Posts: 218
Gene F is a splendid one to beholdGene F is a splendid one to beholdGene F is a splendid one to beholdGene F is a splendid one to beholdGene F is a splendid one to beholdGene F is a splendid one to beholdGene F is a splendid one to beholdGene F is a splendid one to behold
Send a message via AIM to Gene F
Re: How to program servos

Quote:
Originally Posted by wun
-127 to +127?
I thought the readings had to be from 0 to 255...
Are you just adding 127 to the outputs at the end of your main loop?
Can you actually use +127 .. -127 and I just havent heard about it?
You do need to send 0 to 254! You get about 120 degrees of motion from the servo with that range and yes the 7.2 battery is required.
__________________
- Gene Falendysz
  #7   Spotlight this post!  
Unread 24-02-2004, 11:48
Kevin Karan's Avatar
Kevin Karan Kevin Karan is offline
Linux Guy
AKA: maxdamage
None #0174 (Arctic Warriors)
Team Role: Alumni
 
Join Date: Jan 2003
Location: Liverpool, NY
Posts: 141
Kevin Karan will become famous soon enoughKevin Karan will become famous soon enough
Send a message via AIM to Kevin Karan
Re: How to program servos

it realy doesnt matter, as long as its a char variable, it doent matter weather is singed or unsigned. And make sure whatever pwms your using are enabled, not used anywhere else and arnt set as digital i/os
__________________
It isnt ALWAYS the programmers falt!
2004: Buckeye team website award
2002: Rutgers semi-finalists
2001: National semi-finalists
2001: Rutgers semi-finalists
1998: Manchester Rookie All-Star Award
  #8   Spotlight this post!  
Unread 24-02-2004, 13:45
bstempi bstempi is offline
Captain
#0708 (Hardwired Hatters)
Team Role: Student
 
Join Date: Feb 2004
Location: Horsham, Pa
Posts: 23
bstempi is an unknown quantity at this point
Send a message via AIM to bstempi
Re: How to program servos

Quote:
Originally Posted by Gene F
You do need to send 0 to 254! You get about 120 degrees of motion from the servo with that range and yes the 7.2 battery is required.
Gene F is the man and God of all hardware. I thought that battery was for back up purposes only. I haven't tried it yet, but I'll plug in that battery. I know my code is correct, so it should work. Thank you guys for your help.

~zBStem
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
2-week FIRST summer program @ WPI ColleenShaver General Forum 20 31-05-2009 03:02
how to add steps in the provided encoder program for the edu Zaramel2002 Programming 3 11-02-2004 08:35
Fried program slots? Jeff Waegelin Programming 18 19-03-2003 18:08
Ahh! Program trick confusing! archiver 2001 9 24-06-2002 02:26
Need help in creating program to use servo's to shift drive archiver 2001 19 24-06-2002 00:35


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

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