skyflyer
Active member
TinyGPS++ allows extraction of any data from any NMEA0183 sentence very easily
All you need to know is the title of the sentence, so suppose it is $ABCDE
The function TinyGPSCustom is then used to get what data you want, say the 5th field in the sentence (data after 5th comma)
eg TinyGPSCustom Dataname(gps, "ABCDE", 5);
tiny GPS is just receiving serial data it doesn't "know" its a GPS sentence or a Depth sentence or a Winsentence so anything can be easily extracted
I got a reply from Timo which I'm sure he won't mind me quoting
In short then, it's all automatic.
I'm confused by your need for Due-custompins or what it does. The Due has two dedicated Can pins so I assume all traffic is sent to/from them?
top left in this image (for those reading who don't have a Due)
All you need to know is the title of the sentence, so suppose it is $ABCDE
The function TinyGPSCustom is then used to get what data you want, say the 5th field in the sentence (data after 5th comma)
eg TinyGPSCustom Dataname(gps, "ABCDE", 5);
tiny GPS is just receiving serial data it doesn't "know" its a GPS sentence or a Depth sentence or a Winsentence so anything can be easily extracted
I got a reply from Timo which I'm sure he won't mind me quoting
You do not need to look due-can.h. It is enough that you have installed due-can library.
Please download the latest NMEA2000 library and at least Arduino IDE 1.6.6. Then you can simply use:
#include <Arduino.h>
#include <NMEA2000_CAN.h>
#include <N2kMessages.h>
as in almost all my updated samples. NMEA2000_CAN.h automatically selects right library according to your board (Mega, Due or Teensy).
Currently NMEA2000 library uses only Can0, so connect MCP2562 to that as in my diagram. Library automatically uses that.
There are several sending samples like TemperatureMonitor, WindMonitor and MessageSender.
In short then, it's all automatic.
I'm confused by your need for Due-custompins or what it does. The Due has two dedicated Can pins so I assume all traffic is sent to/from them?
top left in this image (for those reading who don't have a Due)
Last edited: