- ajouté les fichiers Lua à Hugo :-)

This commit is contained in:
Christian Zufferey
2018-07-22 12:47:37 +02:00
parent 4608e4092e
commit 26d3f422cd
31 changed files with 1346 additions and 0 deletions

17
Hugo/led_press_button.lua Executable 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)