Go Down

Topic: Serial Comm Issue (Read 781 times) previous topic - next topic


Hi, I'm working on a quadrotor project but seem to be having troubles with receiving serial communication on my Arduino.  I'm trying to communicate between my Arduino Pro and my Sparkfun 9DOF razor IMU running the a modified AHRS code.  I have my Arduino connected to an XBee on the hardware serial line communicating to my computer so I am using the new soft serial library for a second serial line. I have the TX and RX lines on the IMU hooked to pins 2 and 3 on the Arduino respectively. I also have the IMU board grounded to the Arduino and both boards are running from their own separate power sources. The problem I seem to be having is that I'm only getting the first 2-3 characters of correct data on the serial monitor  and the rest is gibberish.  I am sure that the IMU is reporting accurate data because I've hooked it directly to my computer and it transmits fine. I am also certain that the baud rate is correct on both devices (57600). I have a very simple program running just to test this:
Code: [Select]

#include <SoftwareSerial.h>
SoftwareSerial mySerial(2, 3);
void setup()  {
void loop(){

Any suggestions?


Change "SoftwareSerial" to "NewSoftSerial".
Send Bitcoin tips to: 1G2qoGwMRXx8az71DVP1E81jShxtbSh5Hp


I'm sorry, I don't know why I put SoftwareSerial in there I meant to put NewSoftSerial, I have NewSoftSerial in my code now and it still gives me the same results.

Go Up