Go to Post This brings back childhood memories of playing with erector sets... Wait. I still do. :D - Whippet [more]
Home
Go Back   Chief Delphi > Technical > Programming
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 28-01-2013, 10:24
ohdan56's Avatar
ohdan56 ohdan56 is offline
Commander-in-Chief
FRC #4284 (Highlander Robotics Fleet)
Team Role: Teacher
 
Join Date: Jan 2013
Rookie Year: 2011
Location: Cincinnati, OH
Posts: 11
ohdan56 is an unknown quantity at this point
Cool Joystick Turns the Bot Inverted

Basically, when we move the stick left, the robot turns right and vice versa. Forward and reverse controls are setup as desired, but we cannot figure out why the turning is inverted or what part of the code needs to be changed to meet the preferences of our driver. Please advise, thanks!
__________________
https://goo.gl/photos/8xZ9ixXRC3x14r5i7

I have not failed. I've just found 10,000 ways that won't work.
- Thomas A. Edison

DB
  #2   Spotlight this post!  
Unread 28-01-2013, 10:32
vinnie's Avatar
vinnie vinnie is offline
Registered User
FRC #3309 (Friarbots)
Team Role: College Student
 
Join Date: Oct 2010
Rookie Year: 2010
Location: Los Angeles / Anaheim
Posts: 107
vinnie has a reputation beyond reputevinnie has a reputation beyond reputevinnie has a reputation beyond reputevinnie has a reputation beyond reputevinnie has a reputation beyond reputevinnie has a reputation beyond reputevinnie has a reputation beyond reputevinnie has a reputation beyond reputevinnie has a reputation beyond reputevinnie has a reputation beyond reputevinnie has a reputation beyond repute
Re: Joystick Turns the Bot Inverted

I assume you have something like
Code:
robotdrive.arcadeDrive(joystick.getX(), joystick.getY());
If you change it to
Code:
robotdrive.arcadeDrive(-joystick.getX(), joystick.getY());
and it should invert your turning
__________________
Student (3309) 2010-2013
Mentor (597) 2014
Mentor (3309) 2013-Present
  #3   Spotlight this post!  
Unread 28-01-2013, 10:49
stingray27's Avatar
stingray27 stingray27 is offline
Registered User
AKA: Michael Ray
FRC #0027 (Team RUSH)
Team Role: Alumni
 
Join Date: Mar 2011
Rookie Year: 2010
Location: Clarkston, MI
Posts: 209
stingray27 is a name known to allstingray27 is a name known to allstingray27 is a name known to allstingray27 is a name known to allstingray27 is a name known to allstingray27 is a name known to all
Re: Joystick Turns the Bot Inverted

Or, you do not have to mess with the code at all and flip the pwm wires on your digital sidecar for your drive motor controls (Ex. flip pwm 1 and 2 if 1 and 2 are your drive pwms)
__________________
Michael Ray
Team RUSH 27

Driving Record: 93-64-0 Best Finish: Finalist (x4 FiM Districts)
Coaching Record: 16-7-0 Best Finish: Winner (Kettering Invitationa)l

  #4   Spotlight this post!  
Unread 28-01-2013, 11:30
Physicguy's Avatar
Physicguy Physicguy is offline
It exploded on its own I swear...
AKA: Jeffin James
FRC #2582 (Pantherbots)
Team Role: Mentor
 
Join Date: Jan 2013
Rookie Year: 2008
Location: Lufkin, TX
Posts: 41
Physicguy is just really nicePhysicguy is just really nicePhysicguy is just really nicePhysicguy is just really nice
Re: Joystick Turns the Bot Inverted

Last year my team had the same problem and this was our solution given by our programming team lead... "let just flip the joystick"... i thought it was funny and i wanting to share.
  #5   Spotlight this post!  
Unread 28-01-2013, 11:46
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 Turns the Bot Inverted

Carefully inspect both your code and your wiring. Make sure that the left and right motors are the same ones in both the software and the hardware. It sounds like one of them has the sides swapped.
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


All times are GMT -5. The time now is 02:27.

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