Keyestudio 4WD Bluetooth Multi-functional Car Manual page 89

Hide thumbs Also See for 4WD Bluetooth Multi-functional Car:
Table of Contents

Advertisement

{
stopp();
// clear output material
delay(100);
back();
// going backward for 0.2 second
delay(200);
}
if(Fspeedd < 40)
// assuming the front distance less than 25cm
{
stopp();
delay(100);
// clear output material
ask_pin_L();
// reading out the left distance
delay(delay_time);
// waiting servo motor to be stable
ask_pin_R();
// reading out the right distance
delay(delay_time);
// waiting servo motor to be stable
if(Lspeedd > Rspeedd)
//assuming left distance more than right distance
{
directionn = Lgo;
//turning left
}
if(Lspeedd <= Rspeedd)
//assuming left distance less than or equal to right distance
{
directionn = Rgo;
//turning right
}
keyestudio
www.keyestudio.com
87

Advertisement

Table of Contents
loading

Related Products for Keyestudio 4WD Bluetooth Multi-functional Car

Table of Contents