[Library] MQTTDUINO - Arduino/esp8266 mixed MQTT client
Posted: Tue Feb 24, 2015 4:54 pm
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
publish messages with
and receive message with
You can find it on GITHUB: https://github.com/Suxsem/Mqttduino
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 all
void onMessage(String topic, String message) { //new message callback
}
You can find it on GITHUB: https://github.com/Suxsem/Mqttduino