-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
d3c5680 Document update 8a9afe7 Document update 7dce81e Missing updated file 62fdd2d Merge pull request #19 from xslim/patch-1 3010625 Re-send ISO Address claim if request came from 0xff d451d77 New features and fixes. See. Changes on Readme 372890a Merge pull request #16 from thomasonw/master 47bfdfe User ISO Request Handler - REVISED 9c6912b Library reference update and new example b5beec2 User ISO Request Handler 8e646fd New PGN 127257. Fix for PGN 127489 f286190 Merge pull request #12 from thomasonw/master d80b511 Added to API -- Optional message lists 23bc3c6 Merge pull request #2 from ttlappalainen/master 67c140d Some example fixes and changes 3748175 Merge pull request #9 from thomasonw/master 8f5b979 Corrected parsing of DCBatStatus ac2c890 Corrected Battery Current in ParseN2kPGN127508 86b4662 Merge pull request #1 from ttlappalainen/master a804b96 Comment update git-subtree-dir: lib/NMEA2000 git-subtree-split: d3c5680
- Loading branch information
Showing
17 changed files
with
462 additions
and
133 deletions.
There are no files selected for viewing
Binary file not shown.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+27.6 KB
...TeensyActisenseListenerSender/Documents/Pololu_CP2104_USB_to_Serial_adapter.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+139 KB
...enseListenerSender/Documents/Pololu_CP2104_USB_to_Serial_adapter_schematics.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+608 KB
Examples/TeensyActisenseListenerSender/Documents/Teensy_Actisense_listener_sender.pdf
Binary file not shown.
Binary file added
BIN
+50.6 KB
...s/TeensyActisenseListenerSender/Documents/Teensy_Actisense_listener_sender_schematics.pdf
Binary file not shown.
35 changes: 35 additions & 0 deletions
35
Examples/TeensyActisenseListenerSender/TeensyActisenseListenerSender.ino
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
// Demo: NMEA2000 library. NMEA 2000 bus Actisense format listener and sender. | ||
// Sends all bus data to serial1 in Actisense format. | ||
// Send all data received from serial (USB) in Actisense format to the N2kBus. | ||
// Use this e.g. with NMEA Simulator (see. http://www.kave.fi/Apps/index.html) to send simulated data to the bus. | ||
|
||
#include <Arduino.h> | ||
#include <NMEA2000_CAN.h> | ||
#include <ActisenseReader.h> | ||
|
||
tActisenseReader ActisenseReader; | ||
|
||
void setup() { | ||
Serial.begin(115200); // Data from PC | ||
Serial1.begin(115200); // Data to PC | ||
NMEA2000.SetForwardStream(&Serial1); | ||
NMEA2000.SetMode(tNMEA2000::N2km_ListenAndSend); | ||
//NMEA2000.SetForwardType(tNMEA2000::fwdt_Text); // Show in clear text | ||
NMEA2000.Open(); | ||
|
||
// I had problem to use same Serial stream for reading and sending. | ||
// It worked for a while, but then stopped. | ||
ActisenseReader.SetReadStream(&Serial); | ||
ActisenseReader.SetMsgHandler(HandleStreamN2kMsg); | ||
} | ||
|
||
void HandleStreamN2kMsg(const tN2kMsg &N2kMsg) { | ||
// N2kMsg.Print(&Serial); | ||
NMEA2000.SendMsg(N2kMsg,-1); | ||
} | ||
|
||
void loop() { | ||
NMEA2000.ParseMessages(); | ||
ActisenseReader.ParseMessages(); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.