added an mqtt config file to change password and client name
This commit is contained in:
parent
0c58cfe717
commit
65134cf73b
3 changed files with 9 additions and 2 deletions
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
mqtt_config.lua
|
2
mqtt_config.lua.example
Normal file
2
mqtt_config.lua.example
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
password=""
|
||||||
|
client_name=""
|
|
@ -1,8 +1,12 @@
|
||||||
dofile("screen.lua")
|
dofile("screen.lua")
|
||||||
attachscreen(18, 19, 0x3C)
|
attachscreen(18, 19, 0x3C)
|
||||||
|
|
||||||
client = mqtt.client("Player", "mqtt.leizour.fr", 8883, true)
|
dofile("mqtt_config.lua")
|
||||||
client:connect("student", "O99Rq8$F12NXzhL5caya")
|
|
||||||
|
client = mqtt.client(client_name, "mqtt.leizour.fr", 8883, true)
|
||||||
|
client:connect("student", password)
|
||||||
|
client:publish("pendu/gamestate", "query", mqtt.QOS0)
|
||||||
|
|
||||||
-- CLK (clock) : D15
|
-- CLK (clock) : D15
|
||||||
-- DT (data) : D2
|
-- DT (data) : D2
|
||||||
-- SW (Bouton): D4
|
-- SW (Bouton): D4
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue