Blog 3 – My First Experience with MQTT
Investigating MQTT
This week I was introduced to MQTT, Message Queuing Telemetry Transport. It is a lightweight messaging protocol commonly used in Internet of Things systems. This was my first time working with MQTT and using cloud expansion boards to connect a micro:bit to the internet. The goal was to get a better understanding of how devices can communicate wirelessly using a shared service.
Understanding MQTT
MQTT works on a publish-subscribe model. Instead of sending messages directly from one device to another, devices send their data to a central service called a broker. Other devices can then subscribe to a topic presented by that broker and receive the data.
As a class we used a shared MQTT broker hosted on Beebotte, which acted as a middle point between devices and apps. This allowed everyone in the class to publish and receive messages through the same system.
![]() |
| Broker connection setup on app |
The Setup
We connected a cloud-enabled micro:bit to Wi-Fi using a cloud expansion board. This micro:bit acted as the bridge to the broker.
![]() |
| Cloud expansion board |
![]() |
| Block code for cloud board |
On the other end, I used the IoT MQTT Panel app on my phone as a client. I subscribed to the topic on the broker and displayed the incoming data. I created a simple dashboard with a gauge and slider, which updated automatically as new data came in. The client micro:bit would send data, triggered by the gyroscope and also display incoming data values.
![]() |
| Client block code |
![]() |
| Client dashboard |
What I Learned
This exercise helped me understand the full data flow:
- The client micro:bit sends data by radio =>
- The cloud micro:bit receives it and published to the broker =>
- The mobile app subscribes to the broker and shows the data






Comments
Post a Comment