cytron smartdriver duo library
Posted: Fri Sep 07, 2018 5:20 pm
Hye,
i am trying to learn to program with cytron_smartdriverduo.h . i have a project to control 4 DC motors independently by using 2 x MDDS30 connected to a base shield v2. i have looked into the sample programming provided 'MDDSPWMTEST' that show the coding to control 2 motors as follows;
may i know how do i add a code for an additional 2 motors to the program? i have simply tried adding #define IN3,IN4,AN3 and AN4. but it does'nt work.
you help is much appreciated.
Thank you
i am trying to learn to program with cytron_smartdriverduo.h . i have a project to control 4 DC motors independently by using 2 x MDDS30 connected to a base shield v2. i have looked into the sample programming provided 'MDDSPWMTEST' that show the coding to control 2 motors as follows;
- CODE: SELECT_ALL_CODE
#include <Cytron_SmartDriveDuo.h>
#define IN1 4 // Arduino pin 4 is connected to MDDS30 pin IN1.
#define AN1 6 // Arduino pin 6 is connected to MDDS30 pin AN1.
#define AN2 5 // Arduino pin 5 is connected to MDDS30 pin AN2.
#define IN2 3 // Arduino pin 3 is connected to MDDS30 pin IN2.
Cytron_SmartDriveDuo smartDriveDuo30(PWM_INDEPENDENT, IN1, IN2, AN1, AN2);
may i know how do i add a code for an additional 2 motors to the program? i have simply tried adding #define IN3,IN4,AN3 and AN4. but it does'nt work.
you help is much appreciated.
Thank you