Current location - Education and Training Encyclopedia - Graduation thesis - High and low level changes of intelligent tracking car
High and low level changes of intelligent tracking car
If the corresponding interface in your circuit outputs a low level when the light is on the black line, you should make the following changes in your program: While (1).

{

if(Zuo = = 1 & amp; & You = =1& & clock ==0)

Forward ();

If (left = = 0&you == 1)

Turn left (); //should be changed to youguai ();

if(you = = 0 & amp; & left == 1)

youguai(); //It should be zooguai ();

} If the corresponding interface in your circuit outputs a high level when the light is pointed at the black line, you should make the following modifications in the program:

while( 1)

{

if(Zuo = = 1 & amp; & You = =1& & clock ==0) Forward (); //should be changed to if(Zuo = = 0 &;; & You = = 0 & amp& amp Zhong == 1)

If (left = = 0&you == 1)? Turn left ();

if(you = = 0 & amp; & left == 1)? youguai();

}