Skip to main content

2 posts tagged with "mqtt"

View All Tags

MQTT Publish Sensor Data

This project demonstrates how to upload temperature readings from a modbus temperature sensor to the cloud via MQTT.

The temperature sensor data is polled automatically, and is sent over MQTT to a MQTT broker every 20 seconds.

You can also manually trigger the data upload by pressing the MD button.

MQTT Publish and Subscribe

This example shows how to use MQTT (Message Queuing Telemetry Transport) protocol to establish a publish-subscribe messaging pattern for IoT and cloud applications. You'll learn how to:

  • Set up MQTT client connections
  • Publish messages to specific topics
  • Subscribe to topics and handle incoming messages

Perfect for building real-time notifications, IoT device communication, or any application requiring lightweight message distribution across multiple clients.

In this example, we have set up MQTT subscribing to one topic named "topic1".

Subscription

In the application, we publish to the topic "topic1" when the "MD" button is pressed, and utilize the "On MQTT Notification" block to handle received data whenever the device receives a notification from the broker on "topic1".

Notification