ttlappalainen / NMEA2000

NMEA2000 library for Arduino
535 stars 226 forks source link

Teensy 3.2 not work with "universal" FlexCAN Libary #53

Closed PeterSte closed 7 years ago

PeterSte commented 7 years ago

Follow instructions to use Teensy 3.2 for Example: NMEA2000/Examples/ TeensyActisenseListenerSender you have to download and add these Libarys (in lets say C:\Program Files\libaries):

Beside that: I do not need to add the lines as described in the instructions:

include

tNMEA2000_teensy NMEA2000; Is this correct because the instruction say I should use it?

Thanks and best regards

ttlappalainen commented 7 years ago

I have used other solution by replacing FlexCAN library under C:\Program Files\Arduino\hardware\teensy\avr\libaries as I mentioned on issue 50 https://github.com/ttlappalainen/NMEA2000/issues/50.

If you use automate selection header NMEA2000_CAN.h, you do not need to define board. So e.g. as in example TemperatureMonitor

include

include // This will automatically choose right CAN library and create suitable NMEA2000 object

include

With this you can easily change board on IDE. That is what I normally use since I have different board types and cross test them.

If you use only Teensy board, you can define

include "NMEA2000.h"

include "NMEA2000_teensy.h"

tNMEA2000_teensy NMEA2000;

PeterSte commented 7 years ago

Replacing the FlexCAN Libary with a working Version is for sure the better solution. Sorry for no looking carefullly enough.
How to use the Libaries is also clearified now. Thanks a lot.