Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Synthiam ARC with opencr #340

Open
qddxl opened this issue Aug 20, 2024 · 0 comments
Open

Use Synthiam ARC with opencr #340

qddxl opened this issue Aug 20, 2024 · 0 comments

Comments

@qddxl
Copy link

qddxl commented Aug 20, 2024

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]
}

}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant