Page 91 - MDP2022-2
P. 91

}
                if  (bluetooth.read()  ==  'w')
                {
                    remember='w';

                    forward();
                }
                if  (bluetooth.read()  ==  's')
                {
                    remember='s';

                    backward();
                }
                else  if  (bluetooth.read()  ==  'a')
                {
                    remember='a';
                    left_turn();

                }
                else  if  (bluetooth.read()  ==  'd')
                {
                    remember='d';

                    right_turn();
                }


                else  if  (bluetooth.read()  ==  'x')
                {
                    remember='x';

                    STOP();
                }
                if  (recive  ==  1  &&  remember=='w')
                {

                    STOP();
                }

            }
   86   87   88   89   90   91   92   93   94   95   96