from machine import Pin
import time
# مداخل البوابة
input1 = Pin(1, Pin.OUT) # GP1 - السلك الأحمر
input2 = Pin(2, Pin.OUT) # GP2 - السلك الأخضر
# نجرّب كل الحالات
while True:
for a in [0, 1]:
for b in [0, 1]:
input1.value(a)
input2.value(b)
print(f"Input1: {a}, Input2: {b}")
time.sleep(1)