Skip to content

Use Synthiam ARC with opencr #340

Description

@qddxl

After loading the EZ-OpenCR firmware from Synthiam onto OpenCR, I added the following code, but I'm still unable to read the data in ARC. Is there any way to resolve this?

#define CmdGetIMUAngleData 250
cIMU IMU;

void setup() {
COMMUNICATION_PORT.begin(_BAUD_RATE);
IMU.begin();
}

void loop() {
IMU.update();
UpdateBuffer3();
doEZProtocol();
}

void doEZProtocol() {
if (IsAvail()) {
byte cmd = ReadByte();

if (cmd == CmdPing) {
  // Return as a "Capability Controller"
  COMMUNICATION_PORT.write(222);
} else if (cmd == CmdGetFirmwareID) {
  Write32(_FIRMWARE_ID);
} else if (cmd is CmdGetIMUAngleData) {
  IMU.update();
  // [Your IMU angle data handling code here]
}

}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions