This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Failed to load latest commit information.
device.ino ========== Core arduino code providing floathub functionality. See floathub.com for more information. The mega directory contains the code flashed to the Arduino Mega. Note that the esp8266 directory contains separate code that is to be flashed to the onboard esp8266. And the electron directory is used to flash the Electron board from Particle.io (for FloatHub devices with cellular connectivity). The boron directory is, similarly, for flashing boron boards from Particle.io. This code no longer uses the Hologram Dash which was briefly used as a cellular connectivity option. The current and recommended build environment for this code is Arduino 1.8.13 with the following serial buffer modifications: HardwareSerial.h in hardware/arduino/avr/cores/arduino/HardwareSerial.h should have the TX and RX buffers changed from 64 bytes to 256 like so: //#define SERIAL_TX_BUFFER_SIZE 64 #define SERIAL_TX_BUFFER_SIZE 256 ... //#define SERIAL_RX_BUFFER_SIZE 64 #define SERIAL_RX_BUFFER_SIZE 256 Similarly, the Software Serial library should be modified: SoftwareSerial.h in hardware/arduino/avr/libraries/SoftwareSerial/ should have the RX buffer changed from 64 bytes to 128 bytes as in: //#define _SS_MAX_RX_BUFF 64 // RX buffer size #define _SS_MAX_RX_BUFF 128 // RX buffer size ESP8266 Libraries ----------------- The currently recommended board library version is 2.5.1. The compile time settings in the Arduino environment are: Board: Adafruit Feather HUZZAH ESP8266 Upload Speed: 115200 CPU Frequency: 80 MHz Flash Size: 4M (3M SPIFFS) Debug Port: Disabled Debug Level: None lwIP Variant: v1.4 Higher Bandwidth VTables: Flash Exceptions: Disabled Erase Flash: Only Sketch SSL Support: All SSL ciphers (most compatible) Electron/Particle.io Libraries ------------------------------ Built and tested with 1.0.1, which is the recommended version. Teensy 4.1 Libraries -------------------- Starting in early 2021, the FloatHub hardware is migrating to Teensy architecture. The modifications to a stock Teensy Arduino install are to change the Serial Buffer sizes in: hardware/teensy/avr/cores/teensy4/HardwareSerialX.cpp With the following changes: Serial1.cpp (to the GPS) Change: #define SERIAL7_TX_BUFFER_SIZE 40 #define SERIAL7_RX_BUFFER_SIZE 64 To: #define SERIAL7_TX_BUFFER_SIZE 256 #define SERIAL7_RX_BUFFER_SIZE 256 Serial6.cpp (for HSNMEA via MAX3232) Change: #define SERIAL7_TX_BUFFER_SIZE 40 #define SERIAL7_RX_BUFFER_SIZE 64 To: #define SERIAL7_TX_BUFFER_SIZE 1024 #define SERIAL7_RX_BUFFER_SIZE 1024 Serial7.cpp (to the ESP8266) Change: #define SERIAL7_TX_BUFFER_SIZE 40 #define SERIAL7_RX_BUFFER_SIZE 64 To: #define SERIAL7_TX_BUFFER_SIZE 2048 #define SERIAL7_RX_BUFFER_SIZE 2048 Serial8.cpp (for NMEA via MAX3232) Change: #define SERIAL7_TX_BUFFER_SIZE 40 #define SERIAL7_RX_BUFFER_SIZE 64 To: #define SERIAL7_TX_BUFFER_SIZE 256 #define SERIAL7_RX_BUFFER_SIZE 256 Acknowledgements ---------------- This code is built on top of the entire Arduino and Teensy ecosystem, none of which would be possible without all of the many contributors to those projects (including several Adafruit Libraries). The N2K Code depends entirely on the NMEA-2000 and related NMEA-0183 libraries from Timo Lappalainen (https://github.com/ttlappalainen/NMEA2000). Encoding of AIS messages into 0183 format depends on the NMEA0183 AIS library from Ronnie Zeiller (https://github.com/ronzeiller/NMEA0183-AIS).