cytron smartdriver duo library

Autonomous Robot, Manual Robot, DC Motor Driver, Stepper Motor Driver, Servo, Multi PWM chip.....

cytron smartdriver duo library

Postby izhar » 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;

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
izhar
Fledgling
 
Posts: 1
Joined: Fri Sep 07, 2018 4:51 pm

Re: cytron smartdriver duo library

Postby ZaM » Tue Sep 18, 2018 12:17 pm

HI,

You also can use another Motor Driver sample code to control your MDDS, for example, use this MD10C example code, choose Sign Magnitude example. The link is example to control motor using Potentiometer as speed input.

You just need to add 3 more PWM and DIR pin, and set your MDDS with PWM input mode with microcontroller (Independent Both)

Link: https://github.com/CytronTechnologies/A ... ag_Pot.ino
ZaM
Moderator
 
Posts: 70
Joined: Tue Nov 23, 2010 4:16 pm


Return to Robot Controller

Who is online

Users browsing this forum: No registered users and 8 guests

cron