Post topics, source code that relate to the Arduino Platform

User avatar
By Suxsem
#10624 Hi all!

I want to share with you the client that I made (for personal purpose) for using MQTT with Arduino.
It's not a real library, it's a lua script to put on the esp8266 (with nodemcu firmware) that do most of the work + an Arduino sketch that communicates with the esp8266 with a simple ASCII protocol.

Then you can subscribe with something like
Code: Select all   mqttSubscribe("hello");   //subscribe to "hello" topic

publish messages with
Code: Select all   mqttPublish("sensor", String(analogRead(A0)), 0);   //publish new message to "sensor" topic, with retain

and receive message with
Code: Select allvoid onMessage(String topic, String message) {   //new message callback
}


You can find it on GITHUB: https://github.com/Suxsem/Mqttduino
Last edited by Suxsem on Thu Feb 26, 2015 8:38 am, edited 1 time in total.