from machine import Pin
from utime import sleep
RLed = Pin(23 ,Pin.OUT)
GLed = Pin(22 ,Pin.OUT)
Btn = Pin(21 , Pin.IN)
print("Hello, ESP32!")
while True:
if (Btn.value() == 1):
RLed.off()
GLed.on()
sleep(1)
GLed.off()
if(Btn.value() == 0):
RLed.on()