//LED + BEEP + Key   Experimental test

#include "key.h"
#include "led.h"
#include "delay.h"
#include "tracking.h"
#include "motor.h"
#include "sys.h"

int main(void)
{
u8 key=0;
delay_init(); // Delay function initialization
LED_Init(); // Initialization and LED Connected hardware interface
KEY_Init();
XUNJI_Init();
MOTOR_Init();

while(1)
{
if(XUNJI_IN1==0&XUNJI_IN2==1&XUNJI_IN3 ==1&XUNJI_IN4==0)
{
go();
}
else 
if( (XUNJI_IN1==1&XUNJI_IN2==1&XUNJI_IN3 ==1&XUNJI_IN4==0)|
(XUNJI_IN1==1&XUNJI_IN2==1&XUNJI_IN3 ==0&XUNJI_IN4==0)|
(XUNJI_IN1==1&XUNJI_IN2==0&XUNJI_IN3 ==0&XUNJI_IN4==0)|
(XUNJI_IN1==0&XUNJI_IN2==1&XUNJI_IN3 ==0&XUNJI_IN4==0) )
{
turn_left();
}
else 
if( (XUNJI_IN1==0&XUNJI_IN2==0&XUNJI_IN3 ==0&XUNJI_IN4==1)|
(XUNJI_IN1==0&XUNJI_IN2==0&XUNJI_IN3 ==1&XUNJI_IN4==1)|
(XUNJI_IN1==0&XUNJI_IN2==1&XUNJI_IN3 ==1&XUNJI_IN4==1)|
(XUNJI_IN1==0&XUNJI_IN2==0&XUNJI_IN3 ==1&XUNJI_IN4==0) )
{
turn_right();
}
else
{
go();
}
}
}

Technology
©2019-2020 Toolsou All rights reserved,
The 11th Blue Bridge Cup python The real topic of the University Group National Games JavaSwing To achieve a simple Lianliankan games 【Spring Source code analysis 】42-@Conditional Detailed explanation element-ui Step on pit record 2019PHP Interview questions ( Continuously updated )PHPJava Misunderstanding —— Method overloading is a manifestation of polymorphism ? First issue 500 100 million , Set up a new Department , What is Tencent going to do ? Google chrome The browser can't open the web page , But what if other browsers can open it ? Regression of dependent variable order categories (R language )【Golang Basic series 10 】Go language On conditional sentences if