first commit

This commit is contained in:
Christian Zufferey
2018-07-22 12:43:16 +02:00
parent 0fa4e7727e
commit 3149e7ecc8
54 changed files with 3043 additions and 0 deletions

17
btn_led.lua Normal file
View File

@@ -0,0 +1,17 @@
-- Programme qui allume la led bleue quand on appuie le bouton flash
-- hv180711.1125
zledbleue=0 --led bleue
zswitch=3--switch flash
gpio.mode(zswitch, gpio.INT, gpio.PULLUP)
function bouton()
if gpio.read(zswitch)==0 then
gpio.write(zledbleue, gpio.LOW)
else
gpio.write(zledbleue, gpio.HIGH)
end
end
gpio.trig(zswitch, "both", bouton)