---
title: "Talk to your Toaster with Mule"
url: "https://maker.wiznet.io/WIZnet/projects/talk-to-your-toaster-with-mule/"
markdown_url: "https://maker.wiznet.io/WIZnet/projects/talk-to-your-toaster-with-mule/md"
type: "UCC: User Created Content"
author: "Sameera Mandalika"
author_url: "https://dev.to/sameera_mandalika/talk-to-your-toaster-with-mule-1mp2"
editor: "WIZnet"
editor_url: "https://maker.wiznet.io/"
original_author: "Sameera Mandalika"
original_url: "https://dev.to/sameera_mandalika/talk-to-your-toaster-with-mule-1mp2"
published: "2023-02-22"
language: "en"
hardware: ["Arduino UNO", "WIZnet W5100 ethernet shield", "SparkFun Ultrasonic Sensor - HC-SR04", "DFRobot Gravity: Analog LM35 Temperature Sensor For Arduino"]
likes: 4
views: 294
comments: 0
source: "WIZnet Makers (https://maker.wiznet.io/)"
---

# Talk to your Toaster with Mule

> Talk to your Toaster with Mule

Original author: Sameera Mandalika (source: https://dev.to/sameera_mandalika/talk-to-your-toaster-with-mule-1mp2)

## Components

- **Arduino UNO** x 1 ([docs](https://www.farnell.com/datasheets/1682209.pdf))
- **WIZnet W5100 ethernet shield** x 1 ([docs](https://www.wiznet.hk/en/open-source-hardware/102-w5100s-ethernetshield.html?search_query=W5100+ethernet+shield&results=84))
- **SparkFun Ultrasonic Sensor - HC-SR04** x 1 ([docs](https://cdn.sparkfun.com/datasheets/Sensors/Proximity/HCSR04.pdf))
- **DFRobot Gravity: Analog LM35 Temperature Sensor For Arduino** x 1 ([docs](https://image.dfrobot.com/image/data/DFR0023/DFR0023_Datasheet.pdf))
- Software: **Arduino IDE** ([docs](https://www.arduino.cc/en/software))

## Documents and links

- [Mule-Hackathon](https://github.com/SMandalika5/Mule-Hackathon) (code)

## Article

## **Sequential Diagram**

[![Sequence Diagram](https://res.cloudinary.com/practicaldev/image/fetch/s--c8LdEKKF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/682cx38c3g9oxef3q1nz.PNG)](https://res.cloudinary.com/practicaldev/image/fetch/s--c8LdEKKF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/682cx38c3g9oxef3q1nz.PNG)

## **Iot-Mule-Adpater:**

The use case of the custom IoT-Mule Adaptor/Connector is –
It connects the MQTT to Mule 4 and exposes sensor’s data to the client and allows the client to communicate back to the sensor by giving commands based on parameters. A custom connector is created to setup connection to the mosquito broker for exposing incoming sensor’s data from IoT device via a Topic i.e., esp/test and the client’s conditions are sent via another Topic i.e., mule/test back to the IoT device. This solution enables communication to-fro from the sensor to Mule and from Mule to sensor.
Figure 1: Below represents the inside package structure of IoT-Mule Adapter/connector.
[![Picture10](https://res.cloudinary.com/practicaldev/image/fetch/s--v7g1bu_b--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/6hwvss7r6mpur0cyjzgi.jpg)](https://res.cloudinary.com/practicaldev/image/fetch/s--v7g1bu_b--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/6hwvss7r6mpur0cyjzgi.jpg)

The following steps involved in creation of connector are:

The connector’s code is shared in github.
<https://github.com/SMandalika5/Mule-Hackathon>

---

Source: https://maker.wiznet.io/WIZnet/projects/talk-to-your-toaster-with-mule/
