Thread: Dead Zones
View Single Post
  #5   Spotlight this post!  
Unread 02-02-2006, 19:35
colman77
 
Posts: n/a
Re: Dead Zones

We use a lookup table to "curve" our drive outputs...
I don't remember the syntax for defining tables offhand; if you need it let me know and I'll look it up tomorrow.
if you put this in your code...

pwm01 = lookuptable[p1_y];

Say you've moved the joystick slightly, and p1_y = 132. This line will define pwm01 as the 133rd value in your lookup table (since lookuptable[0] is the first number in the list).
You could make that 133rd value anything you want... indeed, you could make all table values from 90 to 170 equal to 127, making a freaking huge dead zone.

Hope that helps