|
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.
|