case 0xdf: //5左偏出軌
case 0xcf: //4、5輪左偏
motor_big_right();
t4++;
if(t4==4)
{
t4=0;
motor_right();
}
t0=t1=t2=t3=t5=t6=0;
// delay_1ms(10);
break;
case 0xfe: //0最右偏出軌
case 0xfa:
motor_big_left();
t5++;
if(t5==1)
{
t5=0;
motor_left();
motor_left();
}
t0=t1=t2=t3=t4=t6=0;
// delay_1ms(10);
break;
case 0xbf: //6最左偏出軌
case 0x9f:
motor_big_right();
t6++;
if(t6==1)
{
t6=0;
motor_right();
motor_right();
}
t0=t1=t2=t3=t4=t5=0;
// delay_1ms(10);
break;
case 0xeb: //前兩傳感器壓在黑線上
case 0xdb: //后兩傳感器壓在黑線上
case 0xbe: //中間兩傳感器壓在黑線上
case 0xac: //前四傳感器壓在黑線上
case 0x9a: //后四傳感器壓在黑線上
motor_back();
delay_1ms(200);
motor_stop();