int pin=13;
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
Serial.println("Hello, ESP32!");
pinMode(13, INPUT);
pinMode(14, OUTPUT);
}
void loop() {\
int reading=digitalRead(13);
Serial.println(reading);
if(reading==1)
{
Serial.print("motion render");
digitalWrite(14, HIGH);
}
else
{
Serial.println("no motion");
digitalWrite(14,LOW);
}
// put your main code here, to run repeatedly:
delay(10); // this speeds up the simulation
}