Keyestudio 4WD Bluetooth Multi-functional Car Manual page 98

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

Advertisement

pinMode(Lpwm_pin,OUTPUT); // pin11 (PWM)
pinMode(Rpwm_pin,OUTPUT); // pin10 (PWM)
}
void Set_Speed(unsigned char Left,unsigned char Right)
{
analogWrite(Lpwm_pin,Left);
analogWrite(Rpwm_pin,Right);
}
void advance()
// going forward
{
digitalWrite(pinRB,LOW); // making motor move towards right rear
digitalWrite(pinRF,HIGH);
digitalWrite(pinLB,LOW); // making motor move towards left rear
digitalWrite(pinLF,HIGH);
Car_state = 1;
show_state();
}
void turnR()
//turning right(dual wheel)
{
digitalWrite(pinRB,LOW); //making motor move towards right rear
digitalWrite(pinRF,HIGH);
digitalWrite(pinLB,HIGH);
digitalWrite(pinLF,LOW); //making motor move towards left front
Car_state = 4;
show_state();
}
keyestudio
www.keyestudio.com
96

Advertisement

Table of Contents
loading

Related Products for Keyestudio 4WD Bluetooth Multi-functional Car

Table of Contents