Hi guys,
I connected my NMEA 0183 depth sensor from CruzPro to my Arduino using a ST232CN converter.
This is my setup: Imgur: The magic of the Internet
The sensor wants 12V, so i powered it from external power supply.
I studied the schematic of ST232CN, and i think i made the right connections. Here you can find the datasheet: MEGA
And here is my Arduino code:
#include <SoftwareSerial.h>
#include <nmea.h>
SoftwareSerial nmeaSerial(10,11,true); // RX pin, TX pin (not used), and true means we invert the signal
NMEA nmeaDecoder(ALL);
void setup()
{
Serial.begin(4800);
nmeaSerial.begin(4800);
}
void loop()
{
Serial.println(nmeaSerial.read());
if (nmeaSerial.available() > 0 ) {
if (nmeaDecoder.decode(nmeaSerial.read())) {
Serial.println(nmeaDecoder.sentence());
}
}
}
The problem i found is that my Arduino only prints "-1", so that means nmeaSerial is not available, but I can't understand why... NMEA OUT wire is connected to a RS232 input, while Arduino is connected to the respective TLL Output.
Thank you for your time,
Simone