arduino-libraries / ArduinoMotorCarrier

GNU Lesser General Public License v3.0
16 stars 15 forks source link

`controller.getFWVersion()` fails when using Portenta H7 #62

Open Wilfried71390 opened 10 months ago

Wilfried71390 commented 10 months ago

I'm using a MKR motor carrier with a Portenta H7 board.

It's impossible to connect to the carrier, the sketch fails here: "Couldn't connect! Is the red LED blinking? You may need to update the firmware with FWUpdater sketch" No red LED blinking on carrier (neither on Portenta).

per1234 commented 10 months ago

A claim of support was added in version 2.0.2 of the library: https://github.com/arduino-libraries/ArduinoMotorCarrier/pull/44. However, I can reproduce the fault reported by @Wilfried71390, using the library's example (e.g., examples/MKRMotorCarrier/Motor_test) or this minimal sketch:

#include <ArduinoMotorCarrier.h>

void setup() {
  Serial.begin(115200);
  while (!Serial);
  Wire.begin();
  if (controller.begin()) {
    Serial.print("MKR Motor Carrier connected, firmware version ");
    Serial.println(controller.getFWVersion());
  } else {
    Serial.println("Couldn't connect! Is the red LED blinking? You may need to update the firmware with FWUpdater sketch");
    while (1);
  }
}
void loop() {}

It works as expected when I use the MKR Zero board instead of the Portenta H7.

Wilfried71390 commented 10 months ago

Hello, Thanks a lot per1234, i'm feeling less alone! Why did you change the title of the post in 'controller.getFWVersion'? Does it mean that the issue is link to this request? Does it mean that the 'controller.begin' should work ? Regards Wilfried

Wilfried71390 commented 10 months ago

An other question: did you try to update the firmware of the motor carrier (through the MKR zero board) and then make a new try with the portenta?