View Single Post
  #8   Spotlight this post!  
Unread 08-02-2006, 22:03
DanDon's Avatar
DanDon DanDon is offline
ohhh MY god
AKA: Dan Hoizner
FRC #0375 (The Robotic Plague)
Team Role: Mentor
 
Join Date: Jan 2005
Rookie Year: 2004
Location: Staten Island, NY
Posts: 1,432
DanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond repute
Send a message via ICQ to DanDon Send a message via AIM to DanDon Send a message via MSN to DanDon
Re: Where is tank drive in 2005 code?

Quote:
Originally Posted by ForgottenSalad
We found that out yesterday. If we went forward on the joystick, no matter how little, it'd run full forward... If we went backwards, we'd get gradually faster as you pulled back, but then at 3/4ths of the way it'd reverse and go full forward...
In order to stop the full forward when moving the joystick forward just a bit, you can try putting a deadband into the drive code.

You can try something like this:

Code:
 if(p1_y>117 && p1_y<137) //+-10 unit deadband around 127 neutral
	   pwm01=127;
else
	   pwm01=p1_y;
then just experiment with the deadband size to see which range feels best for you driver(s).

Hope this helps,
__________________