Hi I am using a Nodemcu 1.0 with the iot cloud is it possible to use the scheduler feature with this board? I read on a few posts that it only works with arduino nano,mkr1010 the ones with inbuilt rtc.
Is there a possibility of running the scheduler with the nodemcu connected to an rtc???
Code:
#include "thingProperties.h"
#include <RTCZero.h>
const int relay_light=13;//D7
void setup()
{
Serial.begin(9600);
delay(1500);
initProperties();
ArduinoCloud.begin(ArduinoIoTPreferredConnection);
setDebugMessageLevel(2);
ArduinoCloud.printDebugInfo();
light = false;
}
void loop()
{
ArduinoCloud.update();
test();
}
void test()
{
if (schedule_test.isActive())
{
light = true;
digitalWrite(relay_light, LOW);
}
else
{
light = false;
digitalWrite(relay_light, HIGH);
}
if(ArduinoCloud.connected())
{
time_read = ArduinoCloud.getLocalTime();
}
}
void onScheduleTestChange()
{
}
The error I am getting while running the code are as follows:
/usr/local/bin/arduino-cli compile --fqbn esp8266:esp8266:nodemcuv2:baud=115200,dbg=Disabled,eesz=4M,exception=disabled,ip=lm2f,lvl=None____,vt=flash,wipe=none,xtal=80 --libraries /home/builder/opt/libraries/latest --build-cache-path /tmp --output-dir /tmp/093978891/build --build-path /tmp/arduino-build-6F56BABB6CC2717B8F0329A02576D399 /tmp/093978891/Time_Test_sep05a
WARNING: library rtczero_1_6_0 claims to run on samd architecture(s) and may be incompatible with your current board which runs on esp8266 architecture(s).
Using library arduinomqttclient_0_1_6 at version 0.1.6 in folder: /home/builder/opt/libraries/arduinomqttclient_0_1_6
Using library rtczero_1_6_0 at version 1.6.0 in folder: /home/builder/opt/libraries/rtczero_1_6_0
In file included from /tmp/093978891/Time_Test_sep05a/Time_Test_sep05a.ino:3:0:
/home/builder/opt/libraries/latest/rtczero_1_6_0/src/RTCZero.h:31:26: error: 'RTC_MODE2_MASK_SEL_OFF_Val' was not declared in this scope
MATCH_OFF = RTC_MODE2_MASK_SEL_OFF_Val, // Never
^
/home/builder/opt/libraries/latest/rtczero_1_6_0/src/RTCZero.h:33:26: error: 'RTC_MODE2_MASK_SEL_SS_Val' was not declared in this scope
MATCH_SS = RTC_MODE2_MASK_SEL_SS_Val, // Every Minute
^
/home/builder/opt/libraries/latest/rtczero_1_6_0/src/RTCZero.h:34:26: error: 'RTC_MODE2_MASK_SEL_MMSS_Val' was not declared in this scope
MATCH_MMSS = RTC_MODE2_MASK_SEL_MMSS_Val, // Every Hour
^
/home/builder/opt/libraries/latest/rtczero_1_6_0/src/RTCZero.h:35:26: error: 'RTC_MODE2_MASK_SEL_HHMMSS_Val' was not declared in this scope
MATCH_HHMMSS = RTC_MODE2_MASK_SEL_HHMMSS_Val, // Every Day
^
/home/builder/opt/libraries/latest/rtczero_1_6_0/src/RTCZero.h:36:26: error: 'RTC_MODE2_MASK_SEL_DDHHMMSS_Val' was not declared in this scope
MATCH_DHHMMSS = RTC_MODE2_MASK_SEL_DDHHMMSS_Val, // Every Month
^
/home/builder/opt/libraries/latest/rtczero_1_6_0/src/RTCZero.h:37:26: error: 'RTC_MODE2_MASK_SEL_MMDDHHMMSS_Val' was not declared in this scope
MATCH_MMDDHHMMSS = RTC_MODE2_MASK_SEL_MMDDHHMMSS_Val, // Every Year
^
/home/builder/opt/libraries/latest/rtczero_1_6_0/src/RTCZero.h:38:26: error: 'RTC_MODE2_MASK_SEL_YYMMDDHHMMSS_Val' was not declared in this scope
MATCH_YYMMDDHHMMSS = RTC_MODE2_MASK_SEL_YYMMDDHHMMSS_Val // Once, on a specific date and a specific time
^
Error during build: exit status 1
Please do help me regarding the same, Thanks in advance.