Go to Post That tetra has personality! - Kevin Thorp [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 31-01-2009, 14:05
DillonMartine DillonMartine is offline
Registered User
FRC #0417
 
Join Date: Jan 2009
Location: Mount Sinai
Posts: 3
DillonMartine is an unknown quantity at this point
Setting the speed on a jaguar in C++

Hello all,

When setting the speed of a jaguar

To drive our robot we are using one jaguar. When the joystick y axis is move above neutral we plan to have the speed of the jaguar increase untill it reaches max. once its at max, we want the motor to continue to move untill the joystick is returned to neutral.

if(stickc->GetY()> 0 && driveflagf==0){
drive->Set(0);
speed = 0;
for(int counter=0;counter<=5;counter++)
{

speed = speed +.2;
drive->Set(speed);
Wait(1);
}
driveflagf = 1;}
if (stickc->GetY()>0 && driveflagf==1){

drive->Set(1);
}
if (stickc->GetY()== 0){
drive->Set(0);



Would the above code accomplish this? we have tested just setting the speed of a jaguar to max by hitting a button, but the jaguar seems to only turn on for a second..
Any Ideas?
  #2   Spotlight this post!  
Unread 31-01-2009, 21:32
programMORT11
 
Posts: n/a
Re: Setting the speed on a jaguar in C++

have you made sure that driveflagf is a static variable?
  #3   Spotlight this post!  
Unread 31-01-2009, 22:31
DillonMartine DillonMartine is offline
Registered User
FRC #0417
 
Join Date: Jan 2009
Location: Mount Sinai
Posts: 3
DillonMartine is an unknown quantity at this point
Re: Setting the speed on a jaguar in C++

Yes its static.. Technically the code should work as intended no?
  #4   Spotlight this post!  
Unread 01-02-2009, 11:26
elcron elcron is offline
Programmer
FRC #0348
Team Role: Programmer
 
Join Date: Apr 2008
Rookie Year: 2008
Location: MA
Posts: 3
elcron is an unknown quantity at this point
Re: Setting the speed on a jaguar in C++

Try holding down the button.
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
pic: Jaguar Speed Controller Padre_Vez Extra Discussion 15 31-01-2009 14:41
Motor speed sensing with the Jaguar motor controller? mminutto FRC Control System 5 13-01-2009 18:13
Brake/Coast setting for speed controller cabbagekid2 Control System 0 16-02-2005 16:54
Brake/Coast setting for speed controller cabbagekid2 Electrical 0 16-02-2005 16:54
Speed Controller brake/coast setting steven114 Electrical 21 03-03-2004 13:05


All times are GMT -5. The time now is 21:51.

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