commit 353f15b1769316771f2374db149a544e3b823e75 Author: Martin Brodbeck Date: Wed Apr 27 21:45:24 2022 +0200 Initial commit. diff --git a/gbmanager.py b/gbmanager.py new file mode 100644 index 0000000..3d64df3 --- /dev/null +++ b/gbmanager.py @@ -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) \ No newline at end of file