A sample implementation of MQTT publisher on Espruino.
- node.js
- npm
Get the source code and install dependencies.
git clone https://github.com/rockymanobi/espruino-mqtt-sample.git
cd espruino-mqtt-sample
npm install
Run the broker and subscriber program.
node broker.js
node subscriber.js
Connect the CC3000 WiFi module and DS18B20 Temperature to your Espruino as follows here.
Run espruino_mqtt.js
on Espruino WebIDE. Then, everytime you press the BTN1, the temperature will be sent to subscriber by MQTT.