Go to Post I would like to think that I would be considered smart no matter who I was. - Kelly [more]
Home
Go Back   Chief Delphi > Technical > Control System
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 12-02-2005, 13:23
silliewillie's Avatar
silliewillie silliewillie is offline
Registered User
#1643 (Bob's Builders in Black)
Team Role: Animator
 
Join Date: Jan 2005
Rookie Year: 2005
Location: Tallmadge Ohio
Posts: 14
silliewillie is on a distinguished road
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.

Last edited by silliewillie : 12-02-2005 at 13:29. Reason: wanted to add more information about my problem
  #2   Spotlight this post!  
Unread 12-02-2005, 14:12
Manoel's Avatar
Manoel Manoel is offline
Registered User
FRC #0383 (Brazilian Machine)
Team Role: Mentor
 
Join Date: Jun 2001
Rookie Year: 2000
Location: Porto Alegre, RS, Brazil
Posts: 608
Manoel has a reputation beyond reputeManoel has a reputation beyond reputeManoel has a reputation beyond reputeManoel has a reputation beyond reputeManoel has a reputation beyond reputeManoel has a reputation beyond reputeManoel has a reputation beyond reputeManoel has a reputation beyond reputeManoel has a reputation beyond reputeManoel has a reputation beyond reputeManoel has a reputation beyond repute
Send a message via ICQ to Manoel Send a message via MSN to Manoel
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.
__________________
Manoel Flores da Cunha
Mentor
Brazilian Machine
Team # 383
  #3   Spotlight this post!  
Unread 12-02-2005, 14:43
silliewillie's Avatar
silliewillie silliewillie is offline
Registered User
#1643 (Bob's Builders in Black)
Team Role: Animator
 
Join Date: Jan 2005
Rookie Year: 2005
Location: Tallmadge Ohio
Posts: 14
silliewillie is on a distinguished road
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.
  #4   Spotlight this post!  
Unread 12-02-2005, 15:01
Manoel's Avatar
Manoel Manoel is offline
Registered User
FRC #0383 (Brazilian Machine)
Team Role: Mentor
 
Join Date: Jun 2001
Rookie Year: 2000
Location: Porto Alegre, RS, Brazil
Posts: 608
Manoel has a reputation beyond reputeManoel has a reputation beyond reputeManoel has a reputation beyond reputeManoel has a reputation beyond reputeManoel has a reputation beyond reputeManoel has a reputation beyond reputeManoel has a reputation beyond reputeManoel has a reputation beyond reputeManoel has a reputation beyond reputeManoel has a reputation beyond reputeManoel has a reputation beyond repute
Send a message via ICQ to Manoel Send a message via MSN to Manoel
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.
__________________
Manoel Flores da Cunha
Mentor
Brazilian Machine
Team # 383
  #5   Spotlight this post!  
Unread 12-02-2005, 15:13
silliewillie's Avatar
silliewillie silliewillie is offline
Registered User
#1643 (Bob's Builders in Black)
Team Role: Animator
 
Join Date: Jan 2005
Rookie Year: 2005
Location: Tallmadge Ohio
Posts: 14
silliewillie is on a distinguished road
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.
  #6   Spotlight this post!  
Unread 12-02-2005, 18:37
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: 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.)
  #7   Spotlight this post!  
Unread 12-02-2005, 21:23
Manoel's Avatar
Manoel Manoel is offline
Registered User
FRC #0383 (Brazilian Machine)
Team Role: Mentor
 
Join Date: Jun 2001
Rookie Year: 2000
Location: Porto Alegre, RS, Brazil
Posts: 608
Manoel has a reputation beyond reputeManoel has a reputation beyond reputeManoel has a reputation beyond reputeManoel has a reputation beyond reputeManoel has a reputation beyond reputeManoel has a reputation beyond reputeManoel has a reputation beyond reputeManoel has a reputation beyond reputeManoel has a reputation beyond reputeManoel has a reputation beyond reputeManoel has a reputation beyond repute
Send a message via ICQ to Manoel Send a message via MSN to Manoel
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.
__________________
Manoel Flores da Cunha
Mentor
Brazilian Machine
Team # 383
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
We need help with joystick control Team ICE #1611 Control System 4 24-01-2005 15:57
Single joystick control problem Mr. Van Programming 7 23-11-2004 09:10
One Joystick Control KWalsh Programming 4 24-02-2004 17:53
Changing 1 joystick code to 2 (rookie team) Brawler006 Programming 5 20-02-2004 17:00
how do i control a piston with a joystick Ryan Foley Programming 2 27-05-2003 17:13


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

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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