You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Reads the Serial in _non blocking_ way!
// Important for the loop handling in Arduino.
#include <ESP8266WiFi.h>
#include <SoftwareSerial.h>
#include <TickerScheduler.h>
#include "config.h"
#define rxPin D7
#define txPin D8
SoftwareSerial mySerial(rxPin, txPin); // RX, TX
char receivedChars[buffsize]; // an array to store the received data
char tempChars[buffsize]; // an array to store the received data
char recv_label[num_keywords][label_bytes] = {0}; // {0} tells the compiler to initalize it with 0.
char recv_value[num_keywords][value_bytes] = {0}; // That does not mean it is filled with 0's
char value[num_keywords][value_bytes] = {0};
static byte blockindex = 0;
bool new_data = false;
bool blockend = false;
String mac_address;
TickerScheduler ts(1);
void AggregateData();
void setup() {
// Open serial communications and wait for port to open:
Serial.begin(19200);
mySerial.begin(19200);
Serial.println("<NodeMCU online...>");
//Set our mac_address which we will later use as ID for API
mac_address = WiFi.macAddress();
mac_address.replace(":", "");
mac_address.toLowerCase();
Serial.println(mac_address);
Serial.println(WiFi.SSID());
// Setup the TickerScheduler
// Add aggregate Ticker - ID(0)
ts.add(0, 1000, AggregateData, 0, true);
}
void loop() {
// This loop is setup to be non blocking.
// Receive information on Serial from MPPT
RecvWithEndMarker();
HandleNewData();
//Update the TickerScheduler
ts.update();
}
void AggregateData() {
Serial.println("I got hit! AggregateTime!");
}
The text was updated successfully, but these errors were encountered:
Hey,
I'm trying to use this nifty library but getting an error. I can't find any real examples but reading the docs this should be the way to do it right?
Using Deviot, with PlatformIO build chain.
Extract of the code
The text was updated successfully, but these errors were encountered: