14
Frequence: the prescale frequency of PWM
6. void MotorDirectionSet(unsigned char Direction)
Description: Adjust the direction of the motors
Direction:can be Forward/Reverse rotating.
Usage:
MotorDirectionSet
(
0b1010
);
//"0b1010" defines the output polarity, "10" means the //M+ is "positive"
while the M- is "negative"
// make sure M+ and M- is different polarity when driving DC motors.
delay
(
1000
);
MotorDirectionSet
(
0b0101
);
//0b0101 Rotating in the opposite direction
delay
(
500
)
7. void MotorDriectionAndSpeedSet(unsigned char Direction,unsigned char MotorSpeedA,unsigned
char MotorSpeedB)
Description: Adjust the direction and speed altogether.
Содержание Grove I2C Motor Driver
Страница 2: ...2 Document Revision History Revision Date Author Description 1 0 Sep 21 2015 Victor He Create file ...
Страница 9: ...6 5 Application ideas Robots Homebuilt RC cars Case fans High power LED illumination ...
Страница 20: ...17 10 Support If you have questions or other better design ideas you can go to our forum or wish to discuss ...