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]
}
}
}
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();
}
}