2022-04-28 09:21:17 -04:00
|
|
|
from machine import Pin
|
|
|
|
|
2022-06-23 09:28:35 -04:00
|
|
|
p = Pin("SW1", Pin.IN)
|
|
|
|
if p.value() == 1:
|
|
|
|
print("pass")
|
2022-04-28 09:21:17 -04:00
|
|
|
else:
|
2022-06-23 09:28:35 -04:00
|
|
|
print("FAIL")
|
2022-04-28 09:21:17 -04:00
|
|
|
|
2022-06-23 09:28:35 -04:00
|
|
|
p = Pin("LED1", Pin.OUT)
|
|
|
|
p.high()
|
|
|
|
if p.value() == 1:
|
|
|
|
print("pass")
|
2022-04-28 09:21:17 -04:00
|
|
|
else:
|
2022-06-23 09:28:35 -04:00
|
|
|
print("FAIL")
|
2022-04-28 09:21:17 -04:00
|
|
|
p.low()
|