Go to Post The real key to drive team coaching is to tie your jacket around your waist. Got a couple championship rings that way. - TravusCubington [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 03-01-2009, 04:01 PM
dboisvert dboisvert is offline
Registered User
AKA: Dan Boisvert
FRC #2405 (Divided by Zero)
Team Role: Programmer
 
Join Date: Feb 2009
Rookie Year: 2008
Location: Michigan
Posts: 57
dboisvert is an unknown quantity at this point
Autonomous Driving

What our robot currently does is move around randomly.

This is that code

Code:
		m_robotDrive->Drive(ajoysticky,aajx);
			Wait(2.0);
			aajx = aajx * .5;
			m_robotDrive->Drive(ajoysticky,aajx);
			Wait(3.0);
			aajx = aajx * -.1;
			m_robotDrive->Drive(ajoysticky,aajx);
			Wait(4.0);
			aajx = aajx * -.1;
			m_robotDrive->Drive(ajoysticky,aajx);
			Wait(6.0);
			aajx = aajx * -.8;
			m_robotDrive->Drive(ajoysticky,aajx);
			Wait(5.0);
			aajx = aajx * -1.2;
			m_robotDrive->Drive(ajoysticky,aajx);
That works perfectly for what its for, but what we want our robot to do instead is move forward for a few seconds and spin in circles and I was wondering what would be the proper technique.



I would assume something similar to this
Code:
RobotDrive *m_robotDrive;
Jaguar* rightmotor;
Jaguar* leftmotor;

m_robotDrive = new RobotDrive(1,2);
rightmotor = new Jaguar(1);
leftmotor = new Jaguar(2);

m_robotDrive->Drive(1,0)
Wait(3.0);
(Set right motor and left motor to 1) so it will cause one side to go forward and the other to go in reverse

(Both are 1 because one cim has to go in reverse)
Im not sure of the proper syntax to set the jaguars speed and I dont have access to the robot so any insight would be much appreciated

-Dan
Reply With Quote
 


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
Driving Tips? Betty_Krocker General Forum 40 02-23-2008 10:12 AM
Driving, What to do? shorterboarder General Forum 0 02-19-2006 06:35 PM
Driving at Last! The_Goodie Robot Showcase 4 02-10-2005 08:23 PM
driving at noon Adam Collet General Forum 6 09-20-2003 11:40 PM
Driving a clutch Kevin A Chit-Chat 18 07-03-2003 04:02 PM


All times are GMT -5. The time now is 09:59 AM.

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