How I can drive 2 Motor_Driver_V1.3

Hello,

can someone tell me how I can Drive 2 Motordriver on Arduino?

Both have another Adress.

I will send a snipped of the code i testet but it didnt work…

[code]
#define driver2 0x08 //Mittleres Shield (A3 + A4)
#define driver1 0x0c //Unteres Shild (A1 + A2)
#define shield1 Motor
#define shield2 Motor

void setup() {

shield1.begin(driver1);
shield2.begin(driver2);

}

void loop() {

[…]

if (a1 == true) {
shield1.speed(MOTOR1, a1_sollspeed);
}
if (a1_ist = a1_sollpos) {
shield1.stop(MOTOR1);
}

// Achse 2
if (a2 == true) {
shield1.speed(MOTOR2, a2_sollspeed);
}
if (a2_ist = a2_sollpos) {
shield1.stop(MOTOR2);
}

// Achse 3
if (a3 == true) {
shield2.speed(MOTOR1, a3_sollspeed);
}
if (a3_ist = a3_sollpos) {
shield2.stop(MOTOR1);
}

// Achse 4
if (a4 == true) {
shield2.speed(MOTOR2, a4_sollspeed);
}
if (a4_ist = a4_sollpos) {
shield2.stop(MOTOR2);
}
}
[/code]

hope someone can help.

Hello,

could you please post how you connect the circuit, especially how you set the address switch? Thx!

I send you my connection plan.



p.s .: Jumper are not plugged
Schematic_liberstellen_temp_20190219190518.png

Hello,

I’ve seen in the schematic you posted that you have used the same power source to supply both the Arduino board and the Motor driver, but the working voltage of 4A Motor is over 6V.

Make sure there are not any problem and do not use USB to supply motor driver or it might be damaged.

Hope the information will help you.

Thanks!

ohhh haha I see. My drawing is wrong. :geek:

The power supply of the motors/board is 12V.

It is a drawing error of mine. :mrgreen: