You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
448 B
17 lines
448 B
4 years ago
|
import board
|
||
|
import busio
|
||
|
import digitalio
|
||
|
|
||
|
normal_led = digitalio.DigitalInOut(board.GP22)
|
||
|
alarm_led = digitalio.DigitalInOut(board.GP21)
|
||
|
normal_led.direction = digitalio.Direction.OUTPUT
|
||
|
alarm_led.direction = digitalio.Direction.OUTPUT
|
||
|
|
||
|
def flash_led(mode='normal'):
|
||
|
if mode == 'normal':
|
||
|
normal_led.value = True
|
||
|
alarm_led.value = False
|
||
|
else:
|
||
|
normal_led.value = False
|
||
|
alarm_led.value = True
|