Robotinc

Part 2: Why MQTT for IoT Communication

Now that our M5Stick is working, we need a way for it to talk to our AI agents. MQTT is the de facto messaging protocol for IoT devices. Many messaging services use this as standard (I was using Solace previously without even knowing it). MQTT stands for Message Queuing Telemetry Transport.

Why not just use HTTPS like everything else?

HTTPS is great for web browsers, not so great for IoT:

MQTT is built for IoT:

MQTT Packet Structure

Here’s what an MQTT message actually looks like:

MQTT Packet Structure

I always remember the saying “Keep It Simple Stupid” - here we have just enough information to get the message where it needs to go, nothing more.

Our Use Case

For our Physical AI demo:

Our M5Stick subscribes to a command topic, receives the colour change request, updates its screen and publishes back a confirmation.

Next Steps

Part 3: Connecting to AWS IoT Core →