Send commands to Garmin 15H or 15L with Arduino

Has anyone sent commands TO a Garmin 15H or 15L sucessfully?

I can receive NEMA sentences just fine at 4800.

e.g. to tell the garmin NOT to send the $PGRMM sentence, I should be able to send the following to the Garmin according to Garmin docs:

$PRGMO,PGRMM,0 followed by a carriage return and line feed

I have tried this:

Serial2.write("$PGRMO,PGRMM,0"); Serial2.write(13); // carriage return Serial2.write(10); // line feed // I am using Mega serial port 2 here for both sending and receiving

I have tried variations of this code with no luck so far...

What to do?

Instead of

Serial2.write("$PGRMO,PGRMM,0");

you might try

Serial2.[glow]print[/glow]("$PGRMO,PGRMM,0");

Or, use println and remove the next two statements.

Thanks, PaulS

Both codes work, but my problem was hardware. The Rx line was loose!

This works for me using IDE 018 using Arduino Mega serial port 2:

// turn NMEA sentence GPSV off //note only one dollar sign ($) not two

Serial2.println("$PGRMO,GPSV,0");

// turn NMEA sentence GPSV on

Serial2.println("$PGRMO,GPSV,1");