Keyestudio Smart Little Turtle Robot V3 Manual page 136

Table of Contents

Advertisement

www.keyestudio.com
(8) Code Explanation
digitalWrite(ML_Ctrl,LOW):
the high/low level and and the pins that decide rotation direction are
digital pins.
analogWrite(ML_PWM,200):
and the pins that decide the speed of motor must be PWM pins.
(8) Extension Practice
Adjust the speed that PWM controls the motor, hook up in same way.
/*
keyestudio smart turtle robot
lesson 8.2
motor driver
http://www.keyestudio.com
*/
#define ML_Ctrl 2
#define ML_PWM 9
#define MR_Ctrl 4
the rotation direction of motor is decided by
the speed of motor is regulated by PWM,
//define the direction control pin of A motor
//define the PWM control pin of A motor
//define the direction control pin of B motor
136

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents