MQTT Project: send temperature value over MQTT protocol
.
Introduction
I wrote this page for test the MQTT protocol between mbed <->broker <-> android
Required Components
- Mbed board
- LM75A Temperature Sensor (my notebook info)
- Broker account
- Android App MQTT Terminal (Google PLAY LINK)
How works
The goal of this project is send the temperature value read from a LM75 sensor over MQTT protocol to Android Phone.
I divided the project into the following steps:
- First step is create a Broker account, in this test I used CloudMQTT.
- Second step is download the mbed code.
- Third step is open my Android App MQTT Terminal and setup the new Broker.
First Step: Create a Broker
Press the "Control Panel" button and in the new page the button "Create":
Create a new MQTTCloud Instance:
Open the Details of new instance and Create a New User:
Now you have to create a new Rule (use the user create above and insert a new TOPIC).
OK the Broker is created.
Second Step
Download the mbed test code:
Import programMQTT_and_Temperature_Sensore_LM75
Test MQTT Protocol with a Temperature Sensore
You have to change the MQTT data in main.h:
Third Step
Setup the Broker information in the Android App MQTT Terminal:
Then is necessary add a new Topic:
Conclusion
Now is possible receive data from mbed:
Please log in to post comments.