mirror of
https://github.com/micropython/micropython.git
synced 2026-01-07 20:50:14 +01:00
To keep them all together, mirroring the top-level directory structure. Signed-off-by: Damien George <damien@micropython.org>
16 lines
213 B
Python
16 lines
213 B
Python
from machine import Pin
|
|
|
|
p = Pin("SW1", Pin.IN)
|
|
if p.value() == 1:
|
|
print("pass")
|
|
else:
|
|
print("FAIL")
|
|
|
|
p = Pin("LED1", Pin.OUT)
|
|
p.high()
|
|
if p.value() == 1:
|
|
print("pass")
|
|
else:
|
|
print("FAIL")
|
|
p.low()
|