I'm having some trouble interfacing my 9DOF Razor IMU (SEN-10736; http://www.sparkfun.com/products/10736
) with my Arduino Uno. For those who don't know, this IMU (Inertial Measurement Unit) has an 8 MHz Atmega 328 chip which is programmed via the Arduino IDE (selecting the Arduino Pro/Mini (3.3V, 8MHz) option as the board).
The AHRS (Attitude and Heading Reference System) code I'm using for the IMU is from https://dev.qu.tu-berlin.de/projects/sf-razor-9dof-ahrs
, which uses a DCM (Direction Cosine Matrix) filter to obtain pitch, yaw, and roll angles and outputs them via serial. This works wonderfully, especially with the included Processing sketch (a 3D animation showing the board's orientation in real time...quite cool!). I can also see the output by opening a serial monitor to the specified baud rate when the IMU is connected directly to my computer through an FTDI Basic Breakout board (http://www.sparkfun.com/products/9873
However, I've run into some problems getting the IMU to talk to my Uno. I've got them hooked up as follows:
IMU TX >> Uno Rx
IMU RX >> Uno TX
IMU 3.3V >> Uno 3.3V
IMU GND >> Uno GND
Uno >> PC via USB
I've made multiple attempts in trying to access the IMU data from the Uno (as in, we're programming the Uno now) using the various Serial commands (for instance, variable = read() to obtain the data then store it to some variable, and write(variable) or print(variable) to see it in the serial monitor). Since the IMU outputs the yaw, pitch, roll data as an array, I've also tried defining the output as an array, with similar results. I get some numbers, but not getting anything that looks right.
I'm aware that the USB uses the RX/TX of the Uno. I plug in the IMU to the RX/TX ports after the sketch has uploaded. Data shows up in the serial monitor after the IMU is connected, but it's nothing readable and I've double checked that everything's at the same baud rate, I'm accessing the right COM port and that everything is properly connected. Same problem occurs when I use SoftwareSerial (on pins 2 and 3) as well.
There's loads of info of reading sensor data through analog or digital inputs, but I can't find much on serial.
I'm trying to get data from the IMU to control motors, servos, etc.
Sorry for the long post. In light of that:TL;DR
Tried everything I can think of, can't get the new(est) Sparkfun 9DOF IMU to talk to my Arduino Uno via serial.
I'm sure there's something stupid I'm forgetting. Any help is much appreciated!