Blog 3 - MQTT / IFTTT
Introduction
MQTT (Message Queuing Telemetry Transport) is a lightweight messaging protocol widely used in IoT (Internet of Things) applications. It enables devices to communicate with each other efficiently, making it perfect for scenarios where bandwidth or power is limited. MQTT works on a publish-subscribe model, where devices (publishers) send messages to a broker, which then distributes them to interested devices (subscribers). This approach is excellent for building responsive, real-time systems.
I recently experimented with setting up MQTT on a micro:bit using Beebotte as the broker and a CloudBoard to link multiple micro:bits together. My goal was to have these devices communicate seamlessly while sending and receiving JSON payloads. I also wanted to use the IoT MQTT Panel App to interact with the micro:bits, including controlling them with a slider and receiving data in real-time.
Connecting Multiple Micro:bits with CloudBoard
I used a CloudBoard to connect multiple micro:bits. This setup allowed them to communicate, ensuring that when one micro:bit received a slider value, it could broadcast it to the others. This could be perfect for creating synchronized displays, where each micro:bit shows the same number in real-time.By setting up one Micro:bit as the master and the rest as slaves, I could monitor the entire network on the IoT MQTT Panel App.
Using IoT MQTT Panel App for Control
The IoT MQTT Panel App made it easy to monitor the micro:bits remotely.. It allowed me to create a slider linked to the input topic on Beebotte. With this setup, moving the slider on my phone instantly updated the number displayed on the master micro:bit
The app also let me monitor data sent from the micro:bits, such as their roll angles.
As well as setting up MQTT we were also asked to come up with an idea for what we could use MQTT and IFTTT for. My idea would be to have a classroom map display on your phone, which, using motion sensors can display which classrooms are available to sit and study or do some work in. A good example of where to use this is the IT building as it can be tedious to search every floor before finding an available room.







Comments
Post a Comment