Keyestudio 4WD Bluetooth Multi-functional Car Manual page 88

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

Advertisement

digitalWrite(pinRB,LOW); //making motor move towards right rear
digitalWrite(pinRF,HIGH);
digitalWrite(pinLB,HIGH);
digitalWrite(pinLF,LOW); //making motor move towards left front
}
void left()
//turning left(single wheel)
{
digitalWrite(pinRB,HIGH);
digitalWrite(pinRF,LOW );
digitalWrite(pinLB,LOW);
digitalWrite(pinLF,HIGH);
}
void back()
//going backward
{
digitalWrite(pinRB,HIGH); //making motor move towards right rear
digitalWrite(pinRF,LOW);
digitalWrite(pinLB,HIGH); //making motor move towards left rear
digitalWrite(pinLF,LOW);
}
void detection()
//measuring 3 angles(0.90.179)
{
int delay_time = 250;
// time for servo motor turning backward
ask_pin_F();
if(Fspeedd < 20)
keyestudio
//making motor move towards right front
//making motor move towards left rear
// reading out the front distance
// assuming the front distance less than 10cm
www.keyestudio.com
86

Advertisement

Table of Contents
loading

Related Products for Keyestudio 4WD Bluetooth Multi-functional Car

Table of Contents