Gbox 4.20
Grow box automation and monitoring - <a href='https://sites.google.com/site/growboxguy/'>https://sites.google.com/site/growboxguy/</a>
 
Loading...
Searching...
No Matches
SerialLog.h File Reference
#include "Arduino.h"
Include dependency graph for SerialLog.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void logToSerials (const __FlashStringHelper *ToPrint, bool BreakLine=true, uint8_t Indent=3)
 < Logging
 
template<class logLine >
void logToSerials (logLine *ToPrint, bool BreakLine=true, uint8_t Indent=3)
 
template<class logLine >
void logToSerials (logLine &ToPrint, bool BreakLine=true, uint8_t Indent=3)
 Logs generic data types (int, float, String) to both Arduino and ESP Link.
 

Variables

HardwareSerial & ArduinoSerial
 Printing serial messages to the Arduino Serial output and the esp-link Microcontroller Console (uC Console)
 
HardwareSerial & ESPSerial
 Reference to the ESP Link Serial output : Mega 2560 Rev3 Serial:0(RX) 1(TX), Serial1:19(RX1) 18(TX1), Serial2:17(RX2), 16(TX2), Serial4:15(RX3) 14(TX3)
 

Function Documentation

◆ logToSerials() [1/3]

void logToSerials ( const __FlashStringHelper *  ToPrint,
bool  BreakLine = true,
uint8_t  Indent = 3 
)

< Logging

Definition at line 5 of file SerialLog.cpp.

Here is the caller graph for this function:

◆ logToSerials() [2/3]

template<class logLine >
void logToSerials ( logLine &  ToPrint,
bool  BreakLine = true,
uint8_t  Indent = 3 
)

Logs generic data types (int, float, String) to both Arduino and ESP Link.

Template Parameters
logLineThe type of the data being logged.
Parameters
ToPrintReference to the data or variable to be logged.
BreakLineAppend a newline after printing (default: true).
IndentNumber of leading spaces (default: 3).

Definition at line 48 of file SerialLog.h.

◆ logToSerials() [3/3]

template<class logLine >
void logToSerials ( logLine *  ToPrint,
bool  BreakLine = true,
uint8_t  Indent = 3 
)

Definition at line 23 of file SerialLog.h.

Variable Documentation

◆ ArduinoSerial

HardwareSerial& ArduinoSerial
extern

Printing serial messages to the Arduino Serial output and the esp-link Microcontroller Console (uC Console)

Uses templating to handle logging multiple variable types (int,float,char,bool..)

Functions implemented in header file due to: https://stackoverflow.com/questions/10632251/undefined-reference-to-template-function

Printing serial messages to the Arduino Serial output and the esp-link Microcontroller Console (uC Console)

Printing serial messages to the Arduino Serial output and the esp-link Microcontroller Console (uC Console)

Reference to the Arduino Serial

Definition at line 33 of file Gbox420_Mega_Main.ino.

◆ ESPSerial

HardwareSerial& ESPSerial
extern

Reference to the ESP Link Serial output : Mega 2560 Rev3 Serial:0(RX) 1(TX), Serial1:19(RX1) 18(TX1), Serial2:17(RX2), 16(TX2), Serial4:15(RX3) 14(TX3)

ESP-link. Both SLIP and debug messages are sent to ESP over the ESP Serial link.

Definition at line 34 of file Gbox420_Mega_Main.ino.