sans point
This commit is contained in:
parent
9593d00582
commit
bd675f931f
1 changed files with 5 additions and 3 deletions
|
@ -1,4 +1,4 @@
|
||||||
client = mqtt.client("100", "mqtt.leizoour.fr", 8883, true)
|
client = mqtt.client("100", "mqtt.leizour.fr", 8883, true)
|
||||||
client:connect("student", "O99Rq8$F12NXzhL5caya")
|
client:connect("student", "O99Rq8$F12NXzhL5caya")
|
||||||
|
|
||||||
-- CLK (clock) : D19
|
-- CLK (clock) : D19
|
||||||
|
@ -11,8 +11,10 @@ client:connect("student", "O99Rq8$F12NXzhL5caya")
|
||||||
function action(dir, counter, button)
|
function action(dir, counter, button)
|
||||||
cls()
|
cls()
|
||||||
lettre = string.char((counter % 26)+65)
|
lettre = string.char((counter % 26)+65)
|
||||||
--if button==1 then
|
if button==1 then
|
||||||
console("Choix lettre : "....lettre)
|
client:subscribe("pendu",mqtt.QOS0,lettre)
|
||||||
|
end
|
||||||
|
console("Choix lettre : "..lettre)
|
||||||
end
|
end
|
||||||
|
|
||||||
enc = encoder.attach(pio.GPIO19,pio.GPIO21,pio.GPIO23,action)
|
enc = encoder.attach(pio.GPIO19,pio.GPIO21,pio.GPIO23,action)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue