本代码用于初步测试,未使用定时中断
//避免<FlexiTimer2.h>被重复包含
#ifndef __TIMER2_FLAG__
#define __TIMER2_FLAG__
#include <FlexiTimer2.h>
#endif//避免"Motor.h"被重复包含
#ifndef __MOTOR_FLAG__
#define __MOTOR_FLAG__
#include "Motor.h"
#endif//避免"Sensor.h"被重复包含
#ifndef __SENSOR_FLAG__
#define __SENSOR_FLAG__
#include "sensor.h"
#endifvoid setup(){Init();
}void loop(){Straight_tracing();
}