Initial commit.

This commit is contained in:
Martin Brodbeck 2022-04-27 21:45:24 +02:00
commit 353f15b176
1 changed files with 20 additions and 0 deletions

20
gbmanager.py Normal file
View File

@ -0,0 +1,20 @@
import utime
import machine
relais = machine.Pin(15, machine.Pin.OUT, value = 1)
led_onboard = machine.Pin(25, machine.Pin.OUT, value = 0)
def ctrl_relais(active = True):
if active:
relais.value(0)
led_onboard.on()
else:
relais.value(1)
led_onboard.off()
while True:
ctrl_relais(True)
utime.sleep(5)
ctrl_relais(False)
utime.sleep(5)