Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Control System (http://www.chiefdelphi.com/forums/forumdisplay.php?f=177)
-   -   Joystick control rotated? (http://www.chiefdelphi.com/forums/showthread.php?t=34490)

silliewillie 12-02-2005 13:23

Joystick control rotated?
 
Maybe someone out there can help out our all-rookie team.

We're using the 2.4 code on our robot, unmodified. joystick is plugged into port 1 on the OI. We got the robot to move, but when we push the joystick forward, it goes left. when we push it right, it goes forward, when we push it down it goes right and left=reverse. What did we do wrong? did anyone else have this problem? I'd assume something is wrong with our X and Y values, but I searched and couldn't find anything about this.

help appreciated, thanks.

On the dashboard, the values for the joysticks are outputting to PWM ports 1,5,11 and 12...looking at the code we thought that it should be outputting to 13-16. That's puzzling us also.

Manoel 12-02-2005 14:12

Re: Joystick control rotated?
 
Quote:

Originally Posted by silliewillie
Maybe someone out there can help out our all-rookie team.

We're using the 2.4 code on our robot, unmodified. joystick is plugged into port 1 on the OI. We got the robot to move, but when we push the joystick forward, it goes left. when we push it right, it goes forward, when we push it down it goes right and left=reverse. What did we do wrong? did anyone else have this problem? I'd assume something is wrong with our X and Y values, but I searched and couldn't find anything about this.

help appreciated, thanks.

On the dashboard, the values for the joysticks are outputting to PWM ports 1,5,11 and 12...looking at the code we thought that it should be outputting to 13-16. That's puzzling us also.

From your description, is seems your PWM cables are reversed (ie, what you have connected to the victors controlling the right motors should be connected to the left motors and vice versa) AND your right motors are reverse wired (reverse the red and black leads at the output of the Victors connected to your right side motors. Don't forget to do this to both or your right motors, if using the kit gearbox!). That should solve your problem. If it doesn't, ask again. :)

silliewillie 12-02-2005 14:43

Re: Joystick control rotated?
 
Thanks, we'll try that, though we're still a little confused why the code is outputting the joystick values to PWM 1,5,11, and 12. Is that what it's doing for everyone? When looking at the code it seemed like the motors should be plugged into 13-16. Needless to say, we're very new at this.

thanks for the help.

Manoel 12-02-2005 15:01

Re: Joystick control rotated?
 
We have found that it's not a good idea to use PWMs 13-16, because if you're using (timer) interrupts elsewhere in your code, those outputs can get a bit unpredictable. Anyway, what PWMs are your Victors connected to? And what code are you using (where you downloaded it from? IFI or www.kevin.org?)? A link would help.

silliewillie 12-02-2005 15:13

Re: Joystick control rotated?
 
I had written a whole big statement telling you about our problem, but as i was just about to send it, my programmer figured it out and got it working. thank you so much for your time.

Alan Anderson 12-02-2005 18:37

Re: Joystick control rotated?
 
Quote:

Originally Posted by silliewillie
Thanks, we'll try that, though we're still a little confused why the code is outputting the joystick values to PWM 1,5,11, and 12. Is that what it's doing for everyone? When looking at the code it seemed like the motors should be plugged into 13-16.

The joystick values are copied to the low pwm outputs by the default code. Those are appropriate for dual-joystick "tank" control. For single-joystick control, the comments in default code version 2.4 do say to use pwm13-pwm16, but the actual code controls pwm11 and pwm12. (I assume the change was made because pwm13-pwm16 get a bit twitchy when there are a lot of interrupts going on.)

Manoel 12-02-2005 21:23

Re: Joystick control rotated?
 
Quote:

Originally Posted by silliewillie
I had written a whole big statement telling you about our problem, but as i was just about to send it, my programmer figured it out and got it working. thank you so much for your time.

Great, just make sure he didn't "fix it on programming", because if anything goes wrong with your Victors or motors and you need to replace them, you'll have to install them again exactly as they were, and, in the heat of the competition, it'll be really really hard to, literally, make two wrongs a right. ;)


All times are GMT -5. The time now is 03:59.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi