sparkfun / 9DOF_Razor_IMU

9DOF Razor IMU available from SparkFun Electronics
Other
114 stars 94 forks source link

Serial Output does not work #18

Closed rickblair closed 6 years ago

rickblair commented 6 years ago

When I initially received the unit, it worked with only the USB connected. I hooked another device to the VCC GRND Rx and TX breakout pins to receive serial output. Now the IMU fails in during loop in the call: if ( imu.dmpUpdateFifo() != INV_SUCCESS )

I also cannot log to the LOG_PORT. LOG_PORT.println("foo") does not produce any output. I debugged the programs progress using the Blue LED.

So several questions. What are the Tx Rx breakout pins? Is it Serial1 Seems like IMU is disabled somehow? What to do to reenable?

bboyho commented 6 years ago

Hi,

By default, the data is sent through the USB to the serial monitor by default. If you are trying to send the data through the hardware UART pins (labeled as pins 00|RX and 01|TX), you should be able to receive data on the other device. Just redefine the port for Serial1 on this line

https://github.com/sparkfun/9DOF_Razor_IMU/blob/6df2dc2652e0c30398c1d9f28a5c8e95e8497b82/Firmware/_9DoF_Razor_M0_Firmware/config.h#L25

as

#define LOG_PORT SERIAL_PORT_HARDWARE

I am not sure why the IMU would fail by just connecting to the hardware UART pins on this line:

https://github.com/sparkfun/9DOF_Razor_IMU/blob/2865253ffa7e31ac77c2e741931da7af4e8779a4/Firmware/_9DoF_Razor_M0_Firmware/_9DoF_Razor_M0_Firmware.ino#L148

Without further information your case, all I can do is recommend that you make sure to check your connections and ensure that your device is not sending random data to the IMU. If you have not already, try contacting our support team for further assistance => [ https://www.sparkfun.com/technical_assistance ].