Go Down

Topic: NMEA 2000 Shield (Read 95069 times) previous topic - next topic


Change your printing code to:
Code: [Select]

OutputStream->print("Lowrance Temperature (");
OutputStream->print(") source: ");
OutputStream->print((unsigned char)TempSource);

and try with different sources (engine, water, cabin) and report the results.

L is integer literal and defines value to be treated as long. Actually for PGNs should have been UL
So it looks like the TempSource is the issue -- the TempInstance is correct:

DEBUG:: Lowrance Temperature (Instance: 3 source: 0) // 3 is engine rm
DEBUG:: Lowrance Temperature (Instance: 4 source: 0) // 4 is cabin


Please do not quote everything.

Change code to:
TempSource=(tN2kTempSource)(b & 0x0f);
TempInstance=( (b & 0xf0) >> 4 );


Hi Timo and all,

I tend to built a depth alarm for NMEA 2000 first and later maybe something more ambitious. Have arduino due board and in the mail is coming http://copperhilltech.com/can-bus-mini-breakout-board/. I guess for NMEA-bus that 120 Ohm resistor has to picked off as bus has its own terminations. When trying to verify examples in Timos library following error is generated:

Arduino: 1.8.3 (Windows 10), Board: "Arduino Due (Programming Port)"

C:\Users\heikki\AppData\Local\Temp\arduino_build_230965\sketch\DataDisplay.ino.cpp.o: In function `__static_initialization_and_destruction_0':

C:\Users\heikki\Documents\Arduino\libraries\NMEA2000-master\src/NMEA2000_CAN.h:78: undefined reference to `tNMEA2000_due::tNMEA2000_due()'

collect2.exe: error: ld returned 1 exit status

Using library NMEA2000-master at version 1.1.141 in folder: C:\Users\heikki\Documents\Arduino\libraries\NMEA2000-master
Using library due_can-master at version 2.0.1 in folder: C:\Users\heikki\Documents\Arduino\libraries\due_can-master
exit status 1
Error compiling for board Arduino Due (Programming Port).

Left some jargon of in between the error message in order to make message shorter. What could possibly go wrong here?

Br:  Heikki


Reload the NMEA2000_due (https://github.com/ttlappalainen/NMEA2000_due) library. I can produce that error if I remove file NMEA2000_due.cpp from path libraries\NMEA2000_due-master so I expect you are missing that file.


I will try as Timo suggested. There is a file like that in the location with size of 3KB.


Then you could also try to remove completely your NMEA2000_due-master directory. Then it should give error:
In file included from xxx\Arduino\Examples\xxx\xxx:x:x

xxx\Arduino\libraries\NMEA2000/NMEA2000_CAN.h:77:26: fatal error: NMEA2000_due.h: No such file or directory

 #include <NMEA2000_due.h>

If not you have NMEA2000_due.h somewhere, where it should not be.


Now examples seem to verify correctly. Since my adventure with arduino is 5 days old I uninstalled and deleted everything related to arduino and downloaded everything again. Strangely enough computer still had stuff for due board left.

Go Up