Hello,
I have to say that i'm begginer on Arduino, i like it, and now i want to make a little project.
I get a Marker Plan on Arduino IOT Cloud, i have a NodeMCU board and i want to control a relay with, i run a simple cod, without IOT Cloud and it works.
My problems is, that i don't know how to handle that sketch:
/*
Sketch generated by the Arduino IoT Cloud Thing "NodeMCU-Test"
https://create.arduino.cc/cloud/things/e14af433-7349-49c1-9f27-7c7c29f4aa29Arduino IoT Cloud Properties description
The following variables are automatically generated and updated when changes are made to the Thing properties
bool pornirePompa;
bool pornireVentilatie;
float temperatura;Properties which are marked as READ/WRITE in the Cloud Thing will also have functions
which are called when their values are changed from the Dashboard.
These functions are generated with the Thing and added at the end of this sketch.
*/#include "thingProperties.h"
#define relay 5void setup() {
pinMode(relay, OUTPUT);
digitalWrite(relay, HIGH);
// Initialize serial and wait for port to open:
Serial.begin(9600);
// This delay gives the chance to wait for a Serial Monitor without blocking if none is found
delay(1500);// Defined in thingProperties.h
initProperties();// Connect to Arduino IoT Cloud
ArduinoCloud.begin(ArduinoIoTPreferredConnection);/*
The following function allows you to obtain more information
related to the state of network and IoT Cloud connection and errors
the higher number the more granular information you’ll get.
The default is 0 (only errors).
Maximum is 4
*/
setDebugMessageLevel(2);
ArduinoCloud.printDebugInfo();
}void loop() {
ArduinoCloud.update();
// Your code here}
void onPornirePompaChange() {
Don't know what to put here
}
}void onTemperaturaChange() {
// Do something
}void onPornireVentilatieChange() {
// Do something
}void onFfsdfChange() {
// Do something
}
Thanks,
Alex