I am making a photogate, because the 2 ends of the gate have to be a fair distance apart, I decided to use Arduino IOT cloud to communicate between 2 boards, but I have found an issue where if I use the ArduinoCloud.update(); (which is required for the IOT cloud) the photoresistor/analog pin stops reading values. I am using a DOIT ESP32 DEVKIT V1.
Here is my code
#include "thingProperties.h"
void setup() {
pinMode(10, INPUT);
Serial.begin(9600);
delay(1500);
initProperties();
ArduinoCloud.begin(ArduinoIoTPreferredConnection);
setDebugMessageLevel(2);
ArduinoCloud.printDebugInfo();
}
void loop() {
startBool = analogRead(10);
Serial.println(startBool);
ArduinoCloud.update();
}