Renommé mon Workshop

This commit is contained in:
Christian Zufferey
2020-03-03 00:07:00 +01:00
parent 70961043e4
commit f133207709
68 changed files with 0 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
-- Programme qui allume la led bleue quand on appuie le bouton flash
-- zf181011.1749
print("\n btn_led.lua zf181016.1957 \n")
zledbleue=0 --led bleue
zswitch=3 --switch flash
gpio.mode(zswitch, gpio.INT, gpio.PULLUP)
function zbtn()
if gpio.read(zswitch)==0 then
zled_state="ON"
gpio.write(zledbleue, gpio.LOW)
else
zled_state="OFF"
gpio.write(zledbleue, gpio.HIGH)
end
print(zled_state)
end
gpio.trig(zswitch, "both", zbtn)