Skip to content

Instantly share code, notes, and snippets.

@Ames
Last active October 24, 2016 20:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Ames/1d89989d9facfe7c2c48 to your computer and use it in GitHub Desktop.
Save Ames/1d89989d9facfe7c2c48 to your computer and use it in GitHub Desktop.
Publishing to MQTT on NodeMCU
-- Publish a message to the MQTT Broker
client:publish(
"temp/0", -- topic name
tF, -- message payload
1, -- QOS level
1, -- retain
function(conn) -- on-send callback
print("sent.")
end
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment