Go to Post You know, if I was John V-Neun I would get a copyright on my name! - Jay H 237 [more]
Home
Go Back   Chief Delphi > Technical > Motors
CD-Events   CD-Media   CD-Spy   FRC-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 11-04-2012, 04:15 PM
toadoncart toadoncart is offline
Registered User
FRC #3834
 
Join Date: Feb 2012
Location: United States
Posts: 2
toadoncart is an unknown quantity at this point
motor reverse direction

how do i make my motors reverse direction if i'm programming in java? any possible references anybody could suggest? thx!!!
  #2   Spotlight this post!  
Unread 11-04-2012, 08:01 PM
inkspell4's Avatar
inkspell4 inkspell4 is offline
Registered User
FRC #3650 (Robo Raptors)
Team Role: Programmer
 
Join Date: Jan 2011
Rookie Year: 2011
Location: Maryland
Posts: 326
inkspell4 will become famous soon enough
It all has to do with the pwm value you pass to the motor (try making the value negative)
__________________
Chesapeake Regional : 2013, 2012, 2011
Rookie Year: 2011
2013 RoboRaptors Team 3650 Programming Team Captain
Team Website : http://www.roboraptorsfrcteam3650.com/index.html
_____________________________________________
  #3   Spotlight this post!  
Unread 11-04-2012, 08:06 PM
apples000's Avatar
apples000 apples000 is offline
Registered User
no team
 
Join Date: Mar 2012
Rookie Year: 2012
Location: United States
Posts: 202
apples000 has much to be proud ofapples000 has much to be proud ofapples000 has much to be proud ofapples000 has much to be proud ofapples000 has much to be proud ofapples000 has much to be proud ofapples000 has much to be proud ofapples000 has much to be proud ofapples000 has much to be proud ofapples000 has much to be proud of
Re: motor reverse direction

It depends on what you're trying to do. If you're controlling a motor like motor.set(0.5), then you would change that to motor.set(-0.5). If you're using the output forom a joystick you should change something like motor.set(stick.getX()) to motor.set(-stick.getX()). Where motor is the motor you are inverting, and stick is the joystick you use to control it.
If you are using inverting a drive motor, it is a little different. You must use the setInvertedMotor method of robot drive. You would add drive.setInvertedMotor(kFrontLeft, true) for each of the drive motors you wish to change and would replace drive with the name of your robot drive object. If you only plan on running the motor in one direction, you could just wire the motor to the speed controller in a different way.
  #4   Spotlight this post!  
Unread 11-07-2012, 07:51 PM
theprgramerdude theprgramerdude is offline
WPI Freshman
AKA: Alex
FRC #2503 (Warrior Robotics)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2008
Location: Brainerd, Minnesota
Posts: 347
theprgramerdude has much to be proud oftheprgramerdude has much to be proud oftheprgramerdude has much to be proud oftheprgramerdude has much to be proud oftheprgramerdude has much to be proud oftheprgramerdude has much to be proud oftheprgramerdude has much to be proud oftheprgramerdude has much to be proud oftheprgramerdude has much to be proud oftheprgramerdude has much to be proud of
Re: motor reverse direction

If you're using the SetSpeed function, or whatever it's called now (it's been a few years), the values passed (-1 to 1) determines the speed, with 0 being stopped, 1 being full power one direction, and -1 being the opposite direction at full power. Try negating the value passed in to the controller to make the motor spin the other way.
__________________
Attending: MN Duluth Regional
  #5   Spotlight this post!  
Unread 11-08-2012, 12:50 PM
slijin's Avatar
slijin slijin is offline
Pockets
AKA: Samuel Lijin
FRC #0694 (StuyPulse)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2010
Location: New York City
Posts: 537
slijin is a splendid one to beholdslijin is a splendid one to beholdslijin is a splendid one to beholdslijin is a splendid one to beholdslijin is a splendid one to beholdslijin is a splendid one to beholdslijin is a splendid one to behold
Re: motor reverse direction

This belongs in the programming forum, not the motors forum.

It depends on how you're controlling the motor. The standard method takes a double between -1 and 1 to control the speed; -1 backwards, 0 stopped, 1 forwards.

What programming language are you using? What methods/functions are you using? Details like these would make it easier for us to help you.

Good luck.
__________________

2010-12 CT Chairman's
2011 Galileo 5th seed
2010 NY Regional Winners
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 10:41 AM.

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


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