I purchased this gateway to hopefully get NMEA marine information on my boat to the arduino. Maretron USB100 - NMEA 2000® / USB Gateway (Maretron | USB100) The datasheet and users manual are on the main product page but here are the highlights on the USB output:
USB Standard -USB 1.1
USB Connector - USB Type B
USB Supported Signals - D+, D-, +5V, GND Bi-directional Gateway
USB Auxiliary Power - +5 Volts < 50 mA
If I connect the usb cable from the maretron gateway to a PC and open RealTerm, set the baud rate to 9600 I can see data coming in ok:
$IIXDR,C,,C,ENV_WATER_T,C,23.4,C,ENV_OUTAIR_T,P,100800,P,ENV_ATMOS_P54
$IIXDR,C,23.4,C,ENV_OUTSIDE_T,P,100800,P,ENV_ATMOS_P,H,70.336,P,ENV_OUTSIDE_H0E
$IIMWV,,R,0,M,V*19
I am now trying to read this data using the arduino (uno)
I have tried the ftdi 5v cable from sparkfun (FTDI Cable 5V - DEV-09718 - SparkFun Electronics)
and also the arduino USB/serial light connecting the tx pin on the adapter/cable to rx on the arduino (pin 2) and 5v, gnd (have also tried rx-rx)
but I never get any data. Any thoughts or suggestions greatly apprecited. Thanks
Here is the arduino 1.0 code:
#include <SoftwareSerial.h>
#define rxPin 2
#define txPin 3
SoftwareSerial mySerial = SoftwareSerial(rxPin, txPin);
void setup()
{
Serial.begin(9600);
Serial.println("starting");
// define pin modes for tx, rx:
pinMode(rxPin, INPUT);
pinMode(txPin, OUTPUT);
// set the data rate for the SoftwareSerial port
mySerial.begin(9600);
mySerial.listen();
if (mySerial.isListening()) {
Serial.println("Port is listening!"); // the serial monitor says this
}else{
Serial.println("Port is not listening!");
}
}
void loop() // run over and over
{
//char c = mySerial.read();
//Serial.println(c);
if (mySerial.available()){
Serial.write(mySerial.read());
}
}