|
Re: Code error with while loops??
what function do I put that code under?
I tried puting it in the same place as my while loop, but it didn't do anything.
timer = 0;
while (autonomous_mode) /* DO NOT CHANGE! */
{
if (statusflag.NEW_SPI_DATA) /* 26.2ms loop area */
{
timer++;
Getdata(&rxdata); /* DO NOT DELETE, or you will be stuck here forever! */
//Put your code here
if (timer < 900){
pwm13 = pwm14 = pwm15 = pwm16 = 255;
}
else {
pwm13 = pwm14 = pwm15 = pwm16 = 127;
}
//ect.
Putdata(&txdata); /* DO NOT DELETE, or you will get no PWM outputs! */
}
}
|