void setup() {
// put your setup code here, to run once.
//program yg start ketika awal esp32 ON
pinMode(5, OUTPUT);
pinMode(15, INPUT);
}
void loop() {
// put your main code here, to run repeatedly:
if(digitalRead(15) == HIGH)
{
digitalWrite(5, HIGH);
}
else
{
digitalWrite(5, LOW);
}
delay(10); // this speeds up the simulation
}