Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Robotics Education and Curriculum (http://www.chiefdelphi.com/forums/forumdisplay.php?f=66)
-   -   Autonomous modes? (http://www.chiefdelphi.com/forums/showthread.php?t=23153)

Buster 17-12-2003 07:43

Autonomous modes?
 
Looking for an autonomous code to use as a test. please reply ASAP

KenWittlief 17-12-2003 09:03

Re: Autonomous modes?
 
IF auton=0 then 100 'jump if not auton mode
Ldrive = 254
Rdrive = 0 'pre-emptive victory spin

100: 'continue with rest of code

ok, Im joking around - most peoples auton code from last year is specific to there robot - what do you want your bot to do in auton mode?

Mark McLeod 17-12-2003 10:17

Re: Autonomous modes?
 
Quote:

Originally Posted by Buster
Looking for an autonomous code to use as a test. please reply ASAP

/************************************************** *******
* FUNCTION NAME: Sample_Auto_1
* PURPOSE: Primitive form of autonomous mode program
* This overrides the PWM joystick inputs
* CALLED FROM: user_routines.c, Default_Routine
* ARGUMENTS: none
* RETURNS: void
************************************************** *******/
void Sample_Auto_1(void)
{
static unsigned int counter=0;

/* Sample primitive autonomous mode
* This uses a counter of the number of slow loops as a measurement for how long
* to execute any of the PWM overrides below.
* Note: A timer can also be used in place of "counter"
*/

if (counter<100){
counter++;
PWM_in1 = 200;
PWM_in2 = 200;
}
else if(counter< 150){
counter++;
PWM_in1 = 127;
PWM_in2 = 10;
}
else if(counter< 500){
counter++;
PWM_in1 = 127;
PWM_in2 = 127;
}
else if(counter<700){
counter++;
PWM_in1=254;
PWM_in2=1;
}
else if(counter<900){
counter++;
PWM_in1=1;
PWM_in2=127;
}
else /* Make sure it always stops at the end */
{
PWM_in1 = 127;
PWM_in2 = 127;
}

} /* End Sample_Auto_1 */

Buster 09-01-2004 14:13

Re: Autonomous modes?
 
thanx man

CHS_Tommy 17-03-2004 15:56

Re: Autonomous modes?
 
if you want some more interesting code, our edu bot does the hokey-pokey in the autonomous mode... if you want the code, i can get it from our programmer

put your right foot in, pull your right foot out, put your right foot in and shake it all about.... :D


All times are GMT -5. The time now is 13:55.

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