Go to Post In an education culture that hinges on having the perfect grades and perfect SAT scores to get into the perfect colleges, I enjoy providing an environment where students are encouraged to test their own hypothesis, challenge their assumptions, and regularly fail. - Michael Corsetto [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 04-02-2007, 17:57
JoJo5 JoJo5 is offline
Registered User
no team
 
Join Date: Feb 2007
Location: Long Island
Posts: 4
JoJo5 is an unknown quantity at this point
Code to increase speed when joystick is pushed further

Right now, I just have tank drive-2 motors, 2wheel drive setup, with two joysticks. No matter how far the joystick is pushed forward or backward, the motors turn the same speed. How can I set it up so that when pushed a little, the motor goes a slower speed, than pushing the joystick full throttle?
  #2   Spotlight this post!  
Unread 04-02-2007, 22:46
Kingofl337's Avatar
Kingofl337 Kingofl337 is offline
You didn't see anything....
AKA: Adam
FRC #0501 (Power Knights)
Team Role: Mentor
 
Join Date: Feb 2005
Rookie Year: 1998
Location: Manchester, NH
Posts: 861
Kingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond repute
Send a message via Yahoo to Kingofl337
Re: Code to increase speed when joystick is pushed further

They aren't always going the same speed watch the LEDs on the victors full forward is green and full rev is red and anything in between is off. If you are just touching the joysticks and its going full speed something is wrong.
__________________
FIRST Team 501 PowerKnights - Mentor
FIRST Team 40 Checkmate - Mentor Alum
FIRST Team 146 Blue Lightning - Alumni
  #3   Spotlight this post!  
Unread 05-02-2007, 15:05
Robert Cawthon's Avatar
Robert Cawthon Robert Cawthon is offline
Registered User
no team
 
Join Date: Feb 2007
Rookie Year: 2006
Location: Kansas City, KS
Posts: 275
Robert Cawthon is a splendid one to beholdRobert Cawthon is a splendid one to beholdRobert Cawthon is a splendid one to beholdRobert Cawthon is a splendid one to beholdRobert Cawthon is a splendid one to beholdRobert Cawthon is a splendid one to beholdRobert Cawthon is a splendid one to behold
Re: Code to increase speed when joystick is pushed further

Some things to look at. (If I am starting too simple, bear with me because some people reading this may need the info.) Did you initalize the motors in the "Initialize" portion of the program? This sets the correct PWM port to the motors. Second, did you put the "2 motor tank control" in the operator's portion? Did you set the variables in the tank control? Most inputs are self explanatory. If you have done this, you are past my knowledge.
  #4   Spotlight this post!  
Unread 06-02-2007, 07:29
BradAMiller BradAMiller is offline
Registered User
AKA: Brad
#0190 ( Gompei and the Herd)
Team Role: Mentor
 
Join Date: Mar 2004
Location: Worcester, MA
Posts: 592
BradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant future
Re: Code to increase speed when joystick is pushed further

Quote:
Originally Posted by JoJo5 View Post
Right now, I just have tank drive-2 motors, 2wheel drive setup, with two joysticks. No matter how far the joystick is pushed forward or backward, the motors turn the same speed. How can I set it up so that when pushed a little, the motor goes a slower speed, than pushing the joystick full throttle?
Can you make sure that you are calling the Tank Drive block inside of a loop? That block takes the current joystick values and sends them to the motors. Often people only use the block once - but there should be an infinite loop in the OperatorControl function that contains those blocks so they are called repeatedly. If the block is only used once, it will only send once speed to the motors.
__________________
Brad Miller
Robotics Resource Center
Worcester Polytechnic Institute
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
Problems when combine ADC code && camera code nirhaim1942 Programming 1 24-01-2007 06:58
Gradual Speed Increase Booger Programming 2 24-07-2006 15:44
Joystick Wheel Code Vashts6583 Programming 1 30-01-2006 20:22
Gradual increase in speed? Kevin Rugani Programming 1 27-03-2003 21:36
One Joystick Code fs_2002 Technical Discussion 3 16-01-2002 00:47


All times are GMT -5. The time now is 23:53.

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