View Single Post
  #3   Spotlight this post!  
Unread 17-01-2008, 23:40
wt200999's Avatar
wt200999 wt200999 is offline
Texas Instruments
AKA: Will Toth
FRC #3005 (Robochargers)
Team Role: Mentor
 
Join Date: Mar 2006
Rookie Year: 2004
Location: Dallas, Texas
Posts: 323
wt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud of
Send a message via MSN to wt200999
Re: Reducing the sentivity of the joystick in easyC Pro

I have been playing around with different functions for the joysticks as well. One method that I have been playing around with is a simple linear function that reduces the overall speed of the bot, with the deadband in there, and allowing it to go to full speeds when the driver holds down a button. I know you are using easy c, but this should be understandable:

Code:
if(p1_sw_trig==1)
{
	pwm01=Set_Neutral(p1_y);
	pwm02=Set_Neutral(p2_y);
}
	
else
{
	 pwm01 = Set_Neutral(  ( (.44)*p1_y)+70  ); 
 	 pwm02 = Set_Neutral(  ( (.44)*p2_y)+70  );   
}
Set_Neutral is my deadband function. So right now the maximum forward I can go is 181 and opposite with the reverse. If the driver wants to go full speed ahead right now they just hold down the left trigger. I have heard that too much floating point arithmetic puts more strain on the processor though, so just don't use too much. Hope this helps