---
title: "mbed-os6-stm32-w5500-mqtt"
url: "https://maker.wiznet.io/scarlet/projects/mbed-os6-stm32-w5500-mqtt/"
markdown_url: "https://maker.wiznet.io/scarlet/projects/mbed-os6-stm32-w5500-mqtt/md"
type: "UCC: User Created Content"
author: "Kay Pee"
author_url: "https://github.com/geekshow/mbed-os6-stm32-w5500-mqtt"
editor: "WIZnet"
editor_url: "https://maker.wiznet.io/"
original_author: "Kay Pee"
original_url: "https://github.com/geekshow/mbed-os6-stm32-w5500-mqtt"
published: "2023-11-30"
language: "en"
likes: 0
views: 375
comments: 0
source: "WIZnet Makers (https://maker.wiznet.io/)"
---

# mbed-os6-stm32-w5500-mqtt

> Home MQTT ethernet controller using mbed os

Original author: Kay Pee (source: https://github.com/geekshow/mbed-os6-stm32-w5500-mqtt)

## Article

### **IoT Controller Project (Based on Wiznet W5500, Updated with Role Inclusions)**

---

#### **Project Overview**

- **Objective**: To enable input/output control and network communication using an IoT controller.

- **Technical Base**: Utilizing BluePill (STM32F103C8) and Mbed OS.

---

#### **Key Components and FunctionsInput/Output Management**

- **Digital Input/Output**: Managing 9 digital inputs and 11 digital outputs.

- **LED Output**: Using PC_13 to indicate network status.

**Sensors and Interfaces**

- **DS18B20 Temperature Sensor**: Measuring and transmitting temperature data.

- **I2C Communication**: Communicating with OLED display and other I2C-based devices.

**Network and MQTT Protocol**

- **W5500 Ethernet Interface**: Providing stable network connectivity.

- **MQTT Client**: Using MQTT protocol for data publishing and subscription.

- **Client and Server Roles**
  - **Client Role**:
    - Reacts to external MQTT commands to control outputs and process sensor data.
    - Connects to the MQTT broker to receive and execute messages.
  - **Server-like Functions**:
    - Periodically publishes sensor data and controller status information to the MQTT broker.
    - Supports monitoring and control functions of other systems.

**System Configuration and Program Logic**

- **MQTT Broker Setup**: Connecting to an MQTT broker via specified IP and port.

- **Message Handling**: Using MQTT to transmit controller status, inputs/outputs, and sensor data.

- **Timer-based Tasks**: Periodically updating status and transmitting data.

- **OLED Display Management**: Displaying system status and information.

---

#### **Conclusion and Application Areas**

- This project offers network-based remote monitoring and control capabilities in IoT environments.

- It allows for the integration of various inputs/outputs and sensors, managing data through network connections.

- Efficient data communication using the MQTT protocol extends the scope of IoT applications.

---

Source: https://maker.wiznet.io/scarlet/projects/mbed-os6-stm32-w5500-mqtt/
