Issues addressing multiple Motor Driver (1.3b)

I have two Grove Motor Drivers (1.3b), one set to address 0x0F and the other 0x0A, per the instructions on the Wiki. I cannot seem to address them individually. In fact, I’m starting to think that the only address the driver listens to is 0xF. Has anyone successfully ran two of these on the same bus? If so, what addresses did you use?



This code will drive the back motors fine, but the front board doesn’t do anything. If I flip the address around in code (and change the address on the board), the front board will drive its motors.

[code]
#include “Grove_I2C_Motor_Driver.h”

#define FRONT_ADDR 0x0A
#define BACK_ADDR 0x0F

I2CMotorDriver FrontMotors;
I2CMotorDriver BackMotors;

void setup() {
Serial.begin(9600);
Serial.println(“Motor Test”);

FrontMotors.begin(FRONT_ADDR);
BackMotors.begin(BACK_ADDR);
}

void loop() {
FrontMotors.stop(MOTOR1);
FrontMotors.stop(MOTOR2);
BackMotors.stop(MOTOR1);
BackMotors.stop(MOTOR2);

Serial.println(“Front RIGHT”);
FrontMotors.speed(MOTOR1, 50);
delay(2000);
FrontMotors.stop(MOTOR1);
delay(2000);

Serial.println(“Front LEFT”);
FrontMotors.speed(MOTOR2, 50);
delay(2000);
FrontMotors.stop(MOTOR2);
delay(2000);

Serial.println(“Back RIGHT”);
BackMotors.speed(MOTOR1, 50);
delay(2000);
BackMotors.stop(MOTOR1);
delay(2000);

Serial.println(“Back LEFT”);
BackMotors.speed(MOTOR2, 50);
delay(2000);
BackMotors.stop(MOTOR2);
delay(2000);
}
[/code]

So I started trying random addresses. 0x01 didn’t work but 0x02 did. Bad DIP switches or something?

And now it’s not addressing at 0x02…this board seems flakey.

Interesting. It seems very dependent on the order in which the driver boards come up. If the driver boards get power before the Arduino does, that one driver won’t ever listen to instructions until it’s reset. However, if the Arduino comes up first, all is fine.



I intended to use this with a Jetson Nano, which has 3.3v I2C ports. As such, I removed the Jumper on J4 and the Arduino is powering the bus. Is that a problem?