Why doesn't this work??!??!!?!!!?!?
I am using the following code to make our robot follow the line but it won't build and i was wondering if anyone could help me out cuz i am frantic...
void User_Autonomous_Code(void)
{
while (autonomous_mode)
{
if (statusflag.NEW_SPI_DATA)
{
Getdata(&rxdata); // bad things will happen if you move or delete this
// Autonomous code goes here.
digital_io_1 = 1;
if(rc_dig_1 ==1 )
{
pwm13 = 137 pwm14=100;
{
else
{
pwm13 = pwm14 = 140;
}
if(rc_dig_2 == 1)
{
pwm13 = 100 pwm = 137;
}
else
{
pwm13 = pwm14 = 140;
}
Generate_Pwms(pwm13,pwm14,pwm15,pwm16);
Putdata(&txdata); // even more bad things will happen if you mess with this
}
}
}
Thanks!!!!
|