Reply To: UM7 Binary Parser Arduino Library
Welcome to Redshift Labs › Forums › UM7 Product Support › UM7 Binary Parser Arduino Library › Reply To: UM7 Binary Parser Arduino Library
Thanks for sharing, actually i need to print data via serial to PC , i need (Roll and pitch angles,Yaw angle,Roll and pitch angle rates), you code works fine but when i add following statements, the Arduino Mega2560 doesnt send data to PC …
#include <UM7.h>
UM7 imu;
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
Serial3.begin(115200);
}
void loop() {
// put your main code here, to run repeatedly:
// put your main codeo here, to run repeatedly:
if (Serial3.available() > 0) {
if (imu.encode(Serial3.read())) { // Reads byte from buffer. Valid packet returns true.
//roll, pitch, yaw, roll_rate, pitch_rate, yaw_rate;
Serial.print(“roll = “);
Serial.println(imu.roll);
Serial.print(“pitche = “);
Serial.println(imu.pitch);
Serial.print(“yaw = “);
Serial.println(imu.yaw);
Serial.print(“roll rate = “);
Serial.println(imu.roll_rate);
Serial.print(“pitche rate = “);
Serial.println(imu.pitch_rate);
Serial.print(“yaw rate = “);
Serial.println(imu.yaw_rate);
}
}
}