24 #include <SoftwareSerial.h>
25 #include <ArduinoOTA.h>
28 #define SIM808_CONNECTED
31 #define USE_CONFIG_OVERRIDE
32 #ifdef USE_CONFIG_OVERRIDE
33 #include "ConfigOverride.h"
52 #define PIN_BME_GRND D4
53 #define BME_ADDRESS 0x77
64 #ifdef SIM808_CONNECTED
70 MyMqtt myMqtt(MyWebServer::server.wifiClient(), myOptions, myData);
92 void myDebugInfo(String info,
bool fromWebserver,
bool newline)
94 static bool lastNewLine =
true;
96 if (newline || lastNewLine != newline) {
103 Serial.println(secs + info);
107 Serial.print(tmp + info);
110 lastNewLine = newline;
112 if (!fromWebserver) {
141 Serial.begin(115200);
144 MyDbg(F(
"Start SnorkTracker ..."));
146 #ifdef SIM808_CONNECTED
159 #ifdef SIM808_CONNECTED
185 #ifndef SIM808_CONNECTED
void sleep(bool start=true)
bool gsmHasPower
Is the DC-DC modul switched on?
MyWebServer myWebServer(myOptions, myData)
The Webserver.
TinyGsmClient gsmClient
Gsm client interface.
StringList consoleCmds
open commands to send to the sim808 module
MyOptions myOptions
The global options.
bool isStopping
Are we in a stopping process?
StringList logInfos
received sim808 answers or other logs
void MyDbg(String info, bool fromWebServer=false, bool newline=true)
#define PIN_POWER
power on/off to DC-DC LM2596
bool powerOn
Is the GSM power from the DC-DC modul switched on?
#define PIN_RX
Receive-pin to the sim808 TX.
#define PIN_BME_GRND
Ground pin to the BME280 module.
#define PIN_TX
Transmit-pin to the sim808 RX.
MyDeepSleep myDeepSleep(myOptions, myData)
Helper class for deep sleeps.
MyGsmPower myGsmPower(myData, PIN_POWER)
Helper class to switch on/off the sim808 power.
MyGsmGps myGsmGps(myOptions, myData, PIN_RX, PIN_TX)
sim808 gsm/gps communication class.
#define BME_ADDRESS
BME280 port address (Default 0x77, China 0x76)
MyBME280 myBME280(myOptions, myData, PIN_BME_GRND, BME_ADDRESS)
Helper class for the BME280 sensor communication.
void myDebugInfo(String info, bool fromWebserver, bool newline)
long secondsSincePowerOn()
MyVoltage myVoltage(myOptions, myData)
Helper class for deep sleeps.
bool isSmsEnabled
Is the sms check functionality active?
MyMqtt myMqtt(myGsmGps.gsmClient, myOptions, myData)
Helper class for the mqtt communication via gsm.
void addTail(String newInfo)
MySmsCmd mySmsCmd(myGsmGps, myOptions, myData)
sms controller class for the sms handling.
bool isMqttEnabled
Should the system connect to a MQTT server?
bool isStarting
Are we in a starting process?
bool isGsmActive
Is the sim808 modul connected to a gsm network?
long secondsSincePowerOn()
MyData myData
The global collected data.
bool isOtaActive
Is OverTheAir update active?