Go to Post This is the first (and, if this stuff keeps up, last) time FIRST has allowed high-speed projectiles in years. Please use some common sense, people. - Madison [more]
Home
Go Back   Chief Delphi > Technical > Motors
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 15-02-2008, 19:30
dormedas dormedas is offline
Registered User
FRC #2523
 
Join Date: Jan 2008
Location: A place without spam verification
Posts: 3
dormedas is an unknown quantity at this point
Code to shift with Servos

Okay, well, I'm not our team's programmer but I understand how this works and I cannot for the life of me get these servo shifters on the AM super shifter to do anything. They quite literally do nothing, no turnning or anything. I have been combing the forums for a solution but I am a bit short on time so I just figured I would post the problem. These are the new AM super shifters we are using with servos provided. The code is:

if (pl_sw_trig == 1)
{
pwm15 = 255
pwm16 = 255
}
else
{
pwm15 = 0
pwm16 = 0
}
if (pl_sw_top == 1)
{
pwm15 = 0
pwm16 = 0
}
else
{
pwm15 = 255
pwm16 = 255
}

Do you see anything wrong with what we are doing? or any other information needed to know what's wrong?

EDIT: We hooked up the servo to a standard RC controller with a servo controller... It worked perfectly.
Help?

Last edited by dormedas : 15-02-2008 at 19:40. Reason: New info
  #2   Spotlight this post!  
Unread 15-02-2008, 19:40
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,599
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: Code to shift with Servos

The code looks except for a few typos (missing semicolons, l/1, etc) which I assume is from retyping the code.

Since you are using pwm15 & 16, are you calling either IFI's generate_pwms or Kevins PWM function?

Is the backup battery plugged in and charged? The servos get power from it, so if it isn't working, your servos won't move.
  #3   Spotlight this post!  
Unread 15-02-2008, 19:47
dormedas dormedas is offline
Registered User
FRC #2523
 
Join Date: Jan 2008
Location: A place without spam verification
Posts: 3
dormedas is an unknown quantity at this point
Re: Code to shift with Servos

Yes, the semicolons are actually there. (This is the team programmer speaking)
We are using Kevin Watson's PWM call functions.
Our problem is thatvour 7.2v backup battery was not charged, we ran it off of an external source giving 7.2volts to the backup battery pins..
It worked, thanks a ton! Also: how do we recharge our 7.2v battery?
  #4   Spotlight this post!  
Unread 16-02-2008, 03:15
ay2b's Avatar
ay2b ay2b is offline
Registered User
AKA: Andy
FRC #2928
Team Role: Mentor
 
Join Date: Mar 2004
Rookie Year: 1994
Location: Seattle, WA
Posts: 211
ay2b has a brilliant futureay2b has a brilliant futureay2b has a brilliant futureay2b has a brilliant futureay2b has a brilliant futureay2b has a brilliant futureay2b has a brilliant futureay2b has a brilliant futureay2b has a brilliant futureay2b has a brilliant futureay2b has a brilliant future
Re: Code to shift with Servos

Quote:
Originally Posted by dormedas View Post
how do we recharge our 7.2v battery?
A charger should have come in the electronics box in the kit of parts. If it didn't, or you can't find it, any hobby store and many toy stores should carry chargers for 7.2v NiCad battery packs.
__________________

2011 - SD Quarterfinalists (980), LA Quarterfinalists (980)
2010 - LA (2404) Finalists (980), AZ Motorola Quality (980)
2009 - LA Semifinalists (980); Las Vegas Quarterfinalists (980); SD (2404); IRI #1 Seed, Finalist (980)
2008 - SD Quarterfinalists (980), LA Champions (980), LA Rookie Inspiration Award (2404); CalGames Finalists
2007 - So.Cal Finalists (980), SD Quarterfinalists (980); CalGames Finalists
2006 - So.Cal Regional Champion (4), Toronto Judge's Award Day 1 (4)
2005 - SVR Champions, Delphi "Driving Tomorrow's Technology" (980); AZ Xerox Creativity (980); So.Cal Finalists, RadioShack Innovation in Control (980); Championship Archimedes Division Semifinalists; IRI Finalists (980)
2004 - So.Cal Regional Champions, Leadership in Controls (980); AZ GM Industrial Design (980); Championship Galileo Division #2 Seed; IRI Champions
2003 - PNW Semi-finalists (488)
2002 - PNW Finalists (488)
2000 - X-bot / 488 - Mentor / Founder
1994 - Sunny Delight - Driver - champion
  #5   Spotlight this post!  
Unread 16-02-2008, 12:27
kE7JLM's Avatar
kE7JLM kE7JLM is offline
KE7JLM `
AKA: John Harris
FRC #0842 (Falcon Robotics)
Team Role: Driver
 
Join Date: May 2007
Rookie Year: 2006
Location: Phoenix, AZ`
Posts: 136
kE7JLM is a name known to allkE7JLM is a name known to allkE7JLM is a name known to allkE7JLM is a name known to allkE7JLM is a name known to allkE7JLM is a name known to all
Send a message via MSN to kE7JLM
Re: Code to shift with Servos

Here what I used:

if(p1_sw_trig == 0)
{
pwm05 = pwm06 = 255;
}
else
{
pwm05 = pwm06 = 0;
}
__________________
Team 842 Programmer

Pictures at:
http://picasaweb.google.com/KE7JLM
&
http://picasaweb.google.com/john.h.842

Videos -
http://www.youtube.com/user/KE7JLM

When your not busy with FIRST try NURC

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
To Shift or Not To Shift, That is the Question AdamC Technical Discussion 15 08-11-2007 14:00
using servos with camera team877 Programming 2 01-02-2007 21:26
Are Spikes needed with servos? aksimhal Electrical 9 23-01-2007 20:27
To shift or not to shift? sanddrag Technical Discussion 61 15-04-2003 22:56
Can RC servos be used with EDUbot? ChrisH Technical Discussion 4 31-12-2002 01:45


All times are GMT -5. The time now is 15:26.

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