From bd675f931fd6c2fe1555dab26b04e8e5a4ba8b11 Mon Sep 17 00:00:00 2001 From: vSpaike <153102900+vSpaike@users.noreply.github.com> Date: Thu, 23 Jan 2025 14:44:26 +0100 Subject: [PATCH] sans point --- Affichage_lettre.lua | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Affichage_lettre.lua b/Affichage_lettre.lua index 6fe6a2c..116779a 100644 --- a/Affichage_lettre.lua +++ b/Affichage_lettre.lua @@ -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") -- CLK (clock) : D19 @@ -11,8 +11,10 @@ client:connect("student", "O99Rq8$F12NXzhL5caya") function action(dir, counter, button) cls() lettre = string.char((counter % 26)+65) - --if button==1 then - console("Choix lettre : "....lettre) + if button==1 then + client:subscribe("pendu",mqtt.QOS0,lettre) + end + console("Choix lettre : "..lettre) end enc = encoder.attach(pio.GPIO19,pio.GPIO21,pio.GPIO23,action)