NMEA2000 Library  0.1
Library to handle NMEA 2000 Communication written in C++
TemperatureMonitor.ino File Reference

NMEA2000 library example. Send main cabin and water temperatures to the bus. More...

#include <Arduino.h>
#include <NMEA2000_CAN.h>
#include <N2kMessages.h>
Include dependency graph for TemperatureMonitor.ino:

Go to the source code of this file.

Functions

void loop ()
 
void OnN2kOpen ()
 
double ReadCabinTemp ()
 
double ReadWaterTemp ()
 
void SendN2kTemperature ()
 
void setup ()
 

Variables

tN2kSyncScheduler EnvironmentalScheduler (false, 500, 510)
 
tN2kSyncScheduler OutsideEnvironmentalScheduler (false, 500, 520)
 
tN2kSyncScheduler TemperatureScheduler (false, 2000, 500)
 
const unsigned long TransmitMessages [] ={130310L,130311L,130312L,0}
 

Detailed Description

NMEA2000 library example. Send main cabin and water temperatures to the bus.

This simple example sends hardcoded main cabin and water temperature information to the NMEA2000 bus. To make it working device you need add functionality, which reads real temperatures.

Example does not yet fullfill all NMEA2000 requirements.

Definition in file TemperatureMonitor.ino.

Function Documentation

◆ loop()

void loop ( )

Definition at line 81 of file TemperatureMonitor.ino.

◆ OnN2kOpen()

void OnN2kOpen ( )

Definition at line 40 of file TemperatureMonitor.ino.

◆ ReadCabinTemp()

double ReadCabinTemp ( )

Definition at line 87 of file TemperatureMonitor.ino.

◆ ReadWaterTemp()

double ReadWaterTemp ( )

Definition at line 92 of file TemperatureMonitor.ino.

◆ SendN2kTemperature()

void SendN2kTemperature ( )

Definition at line 97 of file TemperatureMonitor.ino.

◆ setup()

void setup ( )

Definition at line 48 of file TemperatureMonitor.ino.

Variable Documentation

◆ EnvironmentalScheduler

tN2kSyncScheduler EnvironmentalScheduler(false, 500, 510) ( false  ,
500  ,
510   
)

◆ OutsideEnvironmentalScheduler

tN2kSyncScheduler OutsideEnvironmentalScheduler(false, 500, 520) ( false  ,
500  ,
520   
)

◆ TemperatureScheduler

tN2kSyncScheduler TemperatureScheduler(false, 2000, 500) ( false  ,
2000  ,
500   
)

◆ TransmitMessages

const unsigned long TransmitMessages[] ={130310L,130311L,130312L,0}

Definition at line 25 of file TemperatureMonitor.ino.