void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
Serial.println("Hello, ESP32!");
}
void loop() {
// put your main code here, to run repeatedly:
delay(10); // this speeds up the simulation
}
#include "thingProperties.h"
int sensorstate = 4;
void setup() {
pinMode(4, INPUT);
Serial.begin(9600);
delay(1500);
initProperties();
ArduinoCloud.begin(ArduinoIoTPreferredConnection);
setDebugMessageLevel(2);
ArduinoCloud.printDebugInfo();
pir_sensor = digitalRead(sensorstate);
if (pir_sensor == 1) {
Serial.print1n("no intruder");
}
}