---
title: "Implementing the weather data collection project"
url: "https://maker.wiznet.io/louis_m/projects/implementing-the-weather-data-collection-project/"
markdown_url: "https://maker.wiznet.io/louis_m/projects/implementing-the-weather-data-collection-project/md"
type: "UCC: User Created Content"
author: "simuli"
author_url: "https://docs.simuli.co/arduino-projects/weather-data-thingspeak/implementing-the-project"
editor: "WIZnet"
editor_url: "https://maker.wiznet.io/"
original_author: "simuli"
original_url: "https://docs.simuli.co/arduino-projects/weather-data-thingspeak/implementing-the-project"
published: "2023-07-03"
language: "en"
likes: 0
views: 110
comments: 0
source: "WIZnet Makers (https://maker.wiznet.io/)"
---

# Implementing the weather data collection project

> Implementing the weather data collection project

Original author: simuli (source: https://docs.simuli.co/arduino-projects/weather-data-thingspeak/implementing-the-project)

## Article

After setting up your Arduino IDE, paste the following code into it. Change the `mqttPass` with your **MQTT Username, Password, Channel ID **with the ones for your channel and device.

Now we need to export the Compiled Binary for this program. Go to `Sketch` and select `Export Compiled Binary`. This should save a hex file at the location you have saved this sketch. Now go back to Simuli Virtual Lab and open the new instance we had created for this project. Our workspace will now open. Upload the `sketch_name.ino.standard.hex` file by clicking on the Arduino and navigating to where the sketch was stored. Now we just need to reset the Arduino and the program will be loaded.

![](https://2903658835-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M9rAzfyk09Mm-FclXVO%2F-McU64ptFiLvfQONOVJ4%2F-McUN-saVXHpEl7qazcL%2FTS_Data_FInal.png?alt=media&token=2f47f409-8541-400f-b828-52200740877e)

The Arduino will now automatically connect to ThingSpeak and start sending the sensor data. We can see the output of the data in our channel on ThingSpeak. As we change the sensor values, it will also be reflected in the graphs on the channel.

The Arduino may take a few seconds to connect to the MQTT broker, and may initially show errors. If it fails to connect to the MQTT broker even after a minute, reset the Arduino.

We have successfully completed this project. Now you know how to use the Arduino Uno with the W5500 to connect to an MQTT broker and publish the real-time sensor data.

---

Source: https://maker.wiznet.io/louis_m/projects/implementing-the-weather-data-collection-project/
