Files
Fossdeck/Manganese OS/LED.py
T
2021-08-01 08:29:26 -07:00

19 lines
300 B
Python

from machine import Pin, I2C
LED1 = Pin(16, Pin.OUT)
LED2 = Pin(17, Pin.OUT)
def green():
LED2.on()
def red():
LED1.on()
def off(c):
if c == "g" or c == "green":
LED2.off()
elif c == "r" or c == "red":
LED1.off()
else:
LED1.off()
LED2.off()