I'm using an Arduino Uno. "Regular" serial is plugged into my computer, and I can receive just fine.
I'm using AltSoftSerial (tried SoftwareSerial, same results) with RX and TX on pins 8 and 9 to interface with a BR-355S4 GPS module. According to the data sheet on that module, the RX and TX are at 5v, which I believe is what the Arduino expects.
I combined the Serial and SoftwareSerial examples to test the connectivity from the Arduino to my PC and from the GPS to the arduino.
#include <AltSoftSerial.h>
AltSoftSerial altSerial;
void setup() {
//Initialize serial and wait for port to open:
Serial.begin(19200);
while (!Serial) {
; // wait for serial port to connect. Needed for native USB port only
}
printAsciiTable();
altSerial.begin(4800);
}
void printAsciiTable(){
Serial.println("ASCII Table ~ Character Map");
int thisByte;
for(thisByte = 33; thisByte < 127; thisByte++){
Serial.write(thisByte);
Serial.print(", dec: ");
Serial.print(thisByte);
Serial.print(", hex: ");
Serial.print(thisByte, HEX);
Serial.print(", oct: ");
Serial.print(thisByte, OCT);
Serial.print(", bin: ");
Serial.println(thisByte, BIN);
}
Serial.println("~~Done with ASCII Table~~");
}
void loop() {
char c;
if(altSerial.available()){
c = altSerial.read();
Serial.print(c);
}
}
The data coming into the Serial Monitor tool looks fine until it starts pulling from the GPS serial stream (ellipses added by me):
...
|, dec: 124, hex: 7C, oct: 174, bin: 1111100
}, dec: 125, hex: 7D, oct: 175, bin: 1111101
~, dec: 126, hex: 7E, oct: 176, bin: 1111110
~~Done with ASCII Table~~
4™5f3y=›ùÙ)É9Ӧ̙¦ ...
I would like to receive the correct NMEA strings from the GPS module on altSerial and push them out to Serial. The garbled nature of the serial data looks like a baud rate issue, but I've tried a handful of combinations for Serial and altSerial speed with no success. Any ideas?