View Single Post
  #4   Spotlight this post!  
Unread 14-02-2006, 20:43
Inverted Inverted is offline
Registered User
AKA: Eric P.
FRC #1228 (Robo Tribe)
Team Role: College Student
 
Join Date: Jan 2005
Rookie Year: 2004
Location: Rahway, NJ
Posts: 25
Inverted is an unknown quantity at this point
Send a message via AIM to Inverted
Re: Control Problems

Quote:
Originally Posted by 6600gt
Isn't that supposed to be a - not underscore

2000 - p1_y
Whoops, yeah. Guess I got a little shift-happy when I typed that out. In the code it's a -.

Quote:
Originally Posted by Keith Watson
It sounds like the left and right sides are swapped.
I figured that much, but when I tried to mess with the terms, switching the + and -, I only succeeded in making the whole control scheme inverted (how ironic). By that I mean that if you turned the joystick upside down, it worked perfectly. Then I figured that if the controls were inverted, everything would work if I made everything the opposite of what it was, so it looked something like:
Code:
PWM 13 = PWM 14 = Limit_Mix(-(2000 + p1_y + p1_x - 127));
PWM 15 = PWM 16 = Limit_Mix(-(2000 - p1_y + p1_x + 127));
That isn't the correct placement of the +'s and -'s, but you get the idea. Unfortunately, that just made the wheels spin out of control, unable to be feathered. Any idea what I could be doing wrong? I was thinking of just reversing the polarity of the motors on one side so the code would be the same for both sides, but I'd rather mess with the code than screw with the wiring.

Last edited by Inverted : 14-02-2006 at 20:45.