Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Motors (http://www.chiefdelphi.com/forums/forumdisplay.php?f=52)
-   -   Code to shift with Servos (http://www.chiefdelphi.com/forums/showthread.php?t=64205)

dormedas 15-02-2008 19:30

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?

Joe Ross 15-02-2008 19:40

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.

dormedas 15-02-2008 19:47

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?

ay2b 16-02-2008 03:15

Re: Code to shift with Servos
 
Quote:

Originally Posted by dormedas (Post 699771)
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.

kE7JLM 16-02-2008 12:27

Re: Code to shift with Servos
 
Here what I used:

if(p1_sw_trig == 0)
{
pwm05 = pwm06 = 255;
}
else
{
pwm05 = pwm06 = 0;
}


All times are GMT -5. The time now is 05:07.

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