View Single Post
  #24   Spotlight this post!  
Unread 23-01-2007, 14:06
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: mecanum programming

Quote:
Originally Posted by LieAfterLie View Post
they're serial ports.
Joysticks plug into the 15-pin game ports. The only serial port on the OI is the dashboard connector. (Well, there's the radio modem connector, but that's special. And there's serial stuff on the competition port when connected to the field electronics, but that's even more special.)
Quote:
ill use the operator interface leds to test for 255 later, and use signed chars.
Don't use signed chars to store joystick values. They only go from -128 to +127, and would be essentially inside out for motor control. The negative value of greatest magnitude would equate to the slowest forward speed, and the smallest positive value would equate to the fastest negative speed. For reading the joystick values and setting the pwm values, you want unsigned chars. (What you do with those values is your own business; you can obviously subtract 127 from them and get your signed value for internal program use if you like.)