EasyManuals Logo

Waveshare Motor Driver HAT User Manual

Waveshare Motor Driver HAT
16 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #11 background imageLoading...
Page #11 background image
Motor Driver HAT
11 / 16
DEV_Config.c(h): Defines PINS used and communication type, different between
BCM2835 and WiringPi.
PCA9685.c(h): Drive code of PCA9685 chip. Could output 16-channel PWM signal
via I2C interface
MotorDriver.c(.h): Drive code of TB6612FNG chip, control two motors.
main.c: main function
DEMO CODES
1. initialize BCM2835 libraries
if(DEV_ModuleInit())
exit(0);
2. Initialize motor and PCA9685
Motor_Init();
3. Control motors
Motor_Run(MOTORA, FORWARD, 100);
Parameter 1: MOTORA or MOTORB
Parameter 2: FORWARD or BACKWARD
Parameter 3: 0~100
If you use this module to control robot, with this function you can control the
whole motion of robot.

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Waveshare Motor Driver HAT and is the answer not in the manual?

Waveshare Motor Driver HAT Specifications

General IconGeneral
BrandWaveshare
ModelMotor Driver HAT
CategoryControl Unit
LanguageEnglish

Related product manuals