Hio… having issues with this blasted terminal. >.< might just need a pair of fresh eyes or its something else. (fishy… buggy… ). I just can’t see why this happens as every other print works.
Operation
I’m using a custom function for printing data both to serial monitor and to blynk terminal
Looks like this
void printEvent(const String& txt)
{
String log_event = getTimeStamp() + ": " + txt;
Serial.println(log_event);
if (Blynk.connected())
{
terminal.println(txt);
terminal.flush();
}
}
The getTimeStamp function returns current time in the format of “HH:MM:SS” as a string.
Problem
If you look at the images, the terminal somehow breaks on the “Recheck time” string, but works as it should on the serial monitor. And for some reason the texts I am to print before the “Chip RstReason…” is not showing.
// in setup vv
Blynk.syncAll();
delay(10);
sendRstReason(); // @ D_SleepHandler
// in setup ^^
/* ----------- CUSTOM_SETTINGS ----------- */
BLYNK_WRITE(vPin_sleepSlider)
{
sleepInterval = param.asInt();
printEvent(String("Sleep time: ") + String(60/sleepInterval) + String(" minutes"));
Blynk.virtualWrite(vPin_sleepTimeSet, String(60/sleepInterval));
}
BLYNK_WRITE(vPin_recheckSlider)
{
recheckTime = param.asInt();
printEvent(String("Recheck time: ") + param.asStr() + " seconds");
Blynk.virtualWrite(vPin_recheckTimeSet, recheckTime);
}
void sendRstReason()
{
printText = "Wake Reason: ";
printText += ((doorBoot) ? "Timer" : "Door open");
printEvent(printText);
printText = "Chip RstReason: ";
printText += (rstReason = ESP.getResetReason());
printEvent(printText);
}