View Single Post
  #7   Spotlight this post!  
Unread 10-02-2004, 17:57
Code\\Pilot Code\\Pilot is offline
< Only smart people see my avatar
AKA: Rafael Estrada
FRC #1065 (Tatsu)
Team Role: Programmer
 
Join Date: Jan 2004
Rookie Year: 2004
Location: Florida
Posts: 53
Code\\Pilot is an unknown quantity at this point
Send a message via AIM to Code\\Pilot Send a message via MSN to Code\\Pilot
Re: Autonomous problem.

Sorry, i forgot to paste the code. Here it is:

int count = 0;
short end_program = 0; /* will keep program from looping */

void User_Autonomous_Code(void)
{

while (autonomous_mode) /* DO NOT CHANGE! */
{
if (statusflag.NEW_SPI_DATA) /* 26.2ms loop area */
{
Getdata(&rxdata); /* DO NOT DELETE, or you will be stuck here forever! */
if (count < 100)
{
pwm14 = 2000;
pwm16 = 2000; /* supose to go forward while count <100*/
count++;
}



Putdata(&txdata); /* DO NOT DELETE, or you will get no PWM outputs! */
}

}
}



this is found in user_routines_fast, under the function name User_Autonomous_Code.

The LED on the RC says autonomous is activated (blinking yellow) when I initiate the mode on the OI.
So, basically what happens is that the autonomous initiate, but is like not reading the code i wrote.

Thanks.
__________________
Join the Red revolution, give me some RED rep!!!!
if it doesn't work, don't force it. Go get a bigger hammer.

int run = 0;
int robot_chasing_you = 1;

if (robot_chasing_you)
{
run = 254;
}

I got 48 Gmail invites left, pm me with your e-mail so i can send you one.