From 36c857a4be0e7c366fb35e51b264d1ee2a0f7df2 Mon Sep 17 00:00:00 2001 From: nitko12 Date: Fri, 28 Aug 2020 10:19:56 +0200 Subject: [PATCH] Possible fix --- .../4-Google_calendar_example.ino | 2 +- .../3. Projects/4-Google_calendar_example/Network.cpp | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/examples/3. Projects/4-Google_calendar_example/4-Google_calendar_example.ino b/examples/3. Projects/4-Google_calendar_example/4-Google_calendar_example.ino index ac48991..100659d 100644 --- a/examples/3. Projects/4-Google_calendar_example/4-Google_calendar_example.ino +++ b/examples/3. Projects/4-Google_calendar_example/4-Google_calendar_example.ino @@ -92,7 +92,7 @@ void setup() { Serial.begin(115200); - data = (char*)ps_malloc(100000); + data = (char*)ps_malloc(2000000LL); //Initial display settings display.begin(); diff --git a/examples/3. Projects/4-Google_calendar_example/Network.cpp b/examples/3. Projects/4-Google_calendar_example/Network.cpp index 0b7b364..c49682f 100644 --- a/examples/3. Projects/4-Google_calendar_example/Network.cpp +++ b/examples/3. Projects/4-Google_calendar_example/Network.cpp @@ -18,7 +18,10 @@ void Network::begin() delay(1000); ++cnt; - if (cnt == 20) + WiFi.reconnect(); + delay(5000); + + if (cnt == 10) { Serial.println("Can't connect to WIFI, restarting"); delay(100); @@ -67,7 +70,10 @@ bool Network::getData(char *data) delay(1000); ++cnt; - if (cnt == 7) + WiFi.reconnect(); + delay(5000); + + if (cnt == 10) { Serial.println("Can't connect to WIFI, restart initiated."); delay(100);