I am trying to combine a Razor9dof, a GPS (ls20031) to an arduino (duemi).
I have configured the Razor with the ftdi cable. Works fine. Also connected to the arduino, on pin0, works fine.
Here is the code:
void setup() {
Serial.begin(57600);
}
void loop() {
if (Serial.available()) {
Serial.print(Serial.read(), BYTE);
}
}
However, using NewSoftSerial library doesnot work. I get lots of giberish as output.
My code is:
#include <NewSoftSerial.h>
NewSoftSerial nss (4,5);
void setup() {
Serial.begin(115200);
nss.begin(57600);
}
void loop() {
if(nss.available()) {
Serial.print(nss.read(),BYTE);
}
}
I have the gps connected on pin2 and the razor on pin4. Using the above code (and changing pin 4,5 to 2,3); I get the nmea sentences alright.
Any ideas on why serial on pin0 works fine, but NewSoftSerial does not?
Regards,
Nicolas
Replies
Can you show me how you build up the program further if you want to use for example the acceleration measuring? I don’t know how to do it.
Thanks in advance
Johan
Is newsoftserial the way to go?
Regards,
Nico