import time
from machine import Pin
print("Hello, ESP32!")
ampel1_rot = Pin(22, Pin.OUT)
ampel1_gruen = Pin(21, Pin.OUT)
schalter = Pin(23, Pin.IN)
taster = Pin(15, Pin.IN)
while True:
if schalter.value()==1:
print(taster.value())
ampel1_rot.on()
ampel1_gruen.off()
time.sleep(0.5)
ampel1_rot.off()
ampel1_gruen.on()
time.sleep(0.5)