View Single Post
  #2   Spotlight this post!  
Unread 26-01-2006, 14:57
billbo911's Avatar
billbo911 billbo911 is offline
I prefer you give a perfect effort.
AKA: That's "Mr. Bill"
FRC #2073 (EagleForce)
Team Role: Mentor
 
Join Date: Mar 2005
Rookie Year: 2005
Location: Elk Grove, Ca.
Posts: 2,355
billbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond repute
Re: Need help with our deadspace.

Quote:
Originally Posted by sacr3denigma
This is what we are using for our deadspace. Only problem with it is that it jumps from being 127 to say 142 without slowly getting up to speed. We would like to make this much smooth. I am fairly new at robot language but have c++ experience if that helps any. Please reply if you can help thankyou.
temp2 = (unsigned int)p2_y;

if (temp2 > (127 + DEADSPACE))
{
pwm02 = 255 - (unsigned char)(((temp2 - (127 + DEADSPACE)) * (127 / (127 - DEADSPACE))) + 127);
}
else if (temp2 < (127 - DEADSPACE))
{
pwm02 = 255 - (unsigned char)(temp2 * 127 / (127 - DEADSPACE));
}
else
{
pwm02 = 127;
}
I believe what you are seeing is the Dead band built into the Victors themselves. This window, approx. 117 to 137, is to allow for the fact that most Joysticks don't always return to 127 at dead center, there is some variability. So, IFI designed this window to accommodate this variability. My suggestion: Calibrate the Victor to the input being used.

Other users here may suggest alternatives to this. Programming that will apply the standard slope equation, Y=MX+B, is one of them. I find that calibrating the Victor is a little easier, but by no means is it "The Best" way to do it.
__________________
CalGames 2009 Autonomous Champion Award winner
Sacramento 2010 Creativity in Design winner, Sacramento 2010 Quarter finalist
2011 Sacramento Finalist, 2011 Madtown Engineering Inspiration Award.
2012 Sacramento Semi-Finals, 2012 Sacramento Innovation in Control Award, 2012 SVR Judges Award.
2012 CalGames Autonomous Challenge Award winner ($$$).
2014 2X Rockwell Automation: Innovation in Control Award (CVR and SAC). Curie Division Gracious Professionalism Award.
2014 Capital City Classic Winner AND Runner Up. Madtown Throwdown: Runner up.
2015 Innovation in Control Award, Sacramento.
2016 Chezy Champs Finalist, 2016 MTTD Finalist