Keyestudio Smart Little Turtle Robot V3 Manual page 164

Table of Contents

Advertisement

www.keyestudio.com
digitalWrite(left_ctrl,HIGH);
analogWrite(left_pwm,200);
digitalWrite(right_ctrl,LOW);
analogWrite(right_pwm,200);
}
void
right()//define the right-turning state
{
digitalWrite(left_ctrl,LOW);
analogWrite(left_pwm,200);
digitalWrite(right_ctrl,HIGH);
analogWrite(right_pwm,200);
}
void
Stop()//define the state of stop
{
analogWrite(left_pwm,0);
analogWrite(right_pwm,0);
}
//*********************************************************
(5) Test Result
Upload the code to the development board, plug in power and turn on the
164

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents