Keyestudio 4WD Bluetooth Multi-functional Car Manual page 108

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

Advertisement

digitalWrite(servopin,HIGH); //increasing the level of motor interface to upmost
delayMicroseconds(pulsewidth); //delaying microsecond of pulse width value
digitalWrite(servopin,LOW); //decreasing the level of motor interface to the least
delay(20-pulsewidth/1000);
}
void Set_servopulse(int set_val)
{
for(int i=0;i<=10;i++) //giving motor enough time to turn to assigning point
servopulse(servopin,set_val); //invokimg pulse function
}
void M_Control_IO_config(void)
{
pinMode(pinLB,OUTPUT); // /pin 2
pinMode(pinLF,OUTPUT); // pin 4
pinMode(pinRB,OUTPUT); // pin 7
pinMode(pinRF,OUTPUT); // pin 8
pinMode(Lpwm_pin,OUTPUT); // pin 11 (PWM)
pinMode(Rpwm_pin,OUTPUT); // pin10(PWM)
}
void Set_Speed(unsigned char Left,unsigned char Right) //function of setting speed
{
analogWrite(Lpwm_pin,Left);
analogWrite(Rpwm_pin,Right);
}
void advance()
// going forward
{
keyestudio
www.keyestudio.com
106

Advertisement

Table of Contents
loading

Related Products for Keyestudio 4WD Bluetooth Multi-functional Car

Table of Contents