View Single Post
  #4   Spotlight this post!  
Unread 31-01-2008, 07:56
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: 1 Joystick Control

Quote:
Originally Posted by usbcd36 View Post
Simplest way to do that is subtract the value you assign to the PWM outputs from 254:
Guys, usbcd36 has it right. The correct value is 254.

Quote:
Originally Posted by divergentdave View Post
Actually you should subtract from 255...
You explained that by using a pwm value of 255 as an example. However, valid pwm signals are in the range 0-254, with 127 being neutral.

Quote:
Originally Posted by Roger View Post
//The (256- ) part reverses one side's motors so no reverse wiring is needed!
256 is just plain wrong.



Of course, 254 is only the right value to subtract from in theory. With the Victor's observed "neutral bias", though, it might actually work better to choose 132 as the mirror point instead of 127, and subtract from 264 instead (making sure to limit the result to 254 after the subtraction).