from machine import Pin
import time
l1 = Pin(2,Pin.OUT)
while True:
input_value = input("Enter 1 to turn ON, 0 to turn OFF:")
if input_value == "1":
l1.value(1)
elif input_value == "0":
l1.value(0)
else:
print("you type the wrong infoeation")
time.sleep(0.1)