#include"reg51.h" #include #define uchar unsigned char #define uint unsigned int #define left_infrare 0 #define right_infrare 1 #define dj_state1 0X5F //前进 #define dj_state2 0X4F //右转 #define dj_state3 0X1F //左转 #define dj_state4 0X0F //后退 #define dj_state5 0XfF //停车 #define light_off 0x0f //关转向灯 #define left_light 0X5F //左转向灯 两个是5f #define right_light 0XaF //右转向灯0xaf,两个是0xbf #define back_light 0XcF //刹车灯即后灯 #define front_light 0x3f //前灯 #define light_on 0xff //开所有灯