---
title: "Connect WizFi360-EVB-Pico to Azure IoT Cloud!"
url: "https://maker.wiznet.io/austin/projects/connect-wizfi360-evb-pico-to-azure-iot-cloud%21/"
markdown_url: "https://maker.wiznet.io/austin/projects/connect-wizfi360-evb-pico-to-azure-iot-cloud%21/md"
type: "UCC: User Created Content"
author: "austin"
original_author: "Austin"
original_url: "https://www.hackster.io/giung-kim/connect-wizfi360-evb-pico-to-azure-iot-cloud-ca290e"
published: "2022-09-21"
language: "en"
hardware: ["WIZnet WizFi360-EVB-Pico"]
likes: 11
views: 2466
comments: 5
source: "WIZnet Makers (https://maker.wiznet.io/)"
---

# Connect WizFi360-EVB-Pico to Azure IoT Cloud!

> How to connect to Azure IoT Cloud using WizFi360-EVB-Pico.

Original author: Austin (source: https://www.hackster.io/giung-kim/connect-wizfi360-evb-pico-to-azure-iot-cloud-ca290e)

## Components

- **WIZnet WizFi360-EVB-Pico** x 1
- Software: **Microsoft Azure IoT Explorer** ([docs](https://github.com/Azure/azure-iot-explorer))

## Documents and links

- [WizFi360-EVB-Pico-AZURE-C](https://github.com/Wiznet/WizFi360-EVB-Pico-AZURE-C) (code)

## Article

In this document I will provide instructions how to connect latest Wiznet product – **WizFi360-EVB-Pico** to **Azure IoT Cloud**.

I will use **WizFi360-EVB-Pico-AZURE-C** provided by WIZnet.

- [WizFi360-EVB-Pico-AZURE-C](https://github.com/Wiznet/WizFi360-EVB-Pico-AZURE-C)

### **1. Environment Preparation**

Before starting, it is necessary to setup your environment for WizFi360-EVB-Pico. It is same as development environment for Raspberry Pi Pico.

In this guide I used **Windows 10**, **Visual Studio Code** and **C/C++** based environment. For environment preparation I referred to **Getting started with Raspberry Pi Pico** guide on Raspberry Pi documentation website.

- [Raspberry Pi documentation](https://www.raspberrypi.com/documentation/microcontrollers/raspberry-pi-pico.html)

- [Getting started with Raspberry Pi Pico](https://datasheets.raspberrypi.com/pico/getting-started-with-pico.pdf)

If you have any troubles following Raspberry Pi guide, then check below link, where author explains every installation step for environment preparation.

- [Raspberry Pi Pico : C/C++ SDK and Toolchain Setup in Windows 10](https://www.arnabkumardas.com/platforms/rp2040/raspberry-pi-pico-sdk-and-toolchain-setup-in-windows-10/)

Or, refer to my previous post – 'Let's use the Raspberry Pico Ethernet Example! - Development environment configuration'

- [Let's use the Raspberry Pico Ethernet Example! - Development environment configuration](https://blog.naver.com/forever4191/222515594184)

### **2. H/W PreparationWizFi360-EVB-Pico** is a development board that is built on high-performance, low-price MCU **RP2040** and adds Wi-Fi connectivity using **WizFi360**.

More details can be found at below link:

- [WizFi360-EVB-Pico](https://docs.wiznet.io/Product/Open-Source-Hardware/wizfi360-evb-pico)

WizFi360-EVB-Pico is pin compatible to Raspberry Pi Pico. But keep in mind that pins GPIO4 ~ GPIO7 / GPIO20 are used for UART communication / reset between RP2040 and WizFi360.

![](https://hackster.imgix.net/uploads/attachments/1474914/image_OJKNPIqht4.png?auto=compress%2Cformat&w=740&h=555&fit=max)

Follow the steps below to firmware upload and run.

① Connect WizFi360-EVB-Pico to desktop or laptop using 5 pin micro USB cable.

### **3. S/W Preparation**

The following serial terminal program is required for example test, download and install from below link.

- [Tera Term](https://osdn.net/projects/ttssh2/releases/)

### **4. Preparation of Azure IoT Cloud**

Login to [Azure Portal.](https://portal.azure.com/)

If you have no account, create one.

Azure IoT Cloud is paid cloud platform, but you can create a free account

- [Build in the cloud with an Azure free account](https://azure.microsoft.com/en-us/free/)

WIZnet provides 4 samples applications, based on sample application Azure IoT Cloud settings shall be set accordingly.

```plaintext
// The application you wish to use should be uncommented
//
#define APP_TELEMETRY
//#define APP_C2D
//#define APP_CLI_X509
//#define APP_PROV_X509

(...)

//-----------------------------------------------------------------------------------
// CALL Main Funcion - WizFi360 Azure IoT example funcion
// Select one application.
//-----------------------------------------------------------------------------------
#ifdef APP_TELEMETRY
    iothub_ll_telemetry_sample();
#endif // APP_TELEMETRY
#ifdef APP_C2D
    iothub_ll_c2d_sample();
#endif // APP_C2D
#ifdef APP_CLI_X509
    iothub_ll_client_x509_sample();
#endif // APP_CLI_X509
#ifdef APP_PROV_X509
    prov_dev_client_ll_sample();
#endif // APP_PROV_X509
//-----------------------------------------------------------------------------------
```

In this guide, I will proceed with 'iothub_II_telemetry_sample' to connect with Azure IoT Cloud.

① Create IoT Hub

![](https://hackster.imgix.net/uploads/attachments/1474924/image_5xvsbCGTip.png?auto=compress%2Cformat&w=740&h=555&fit=max)

Fill project details and select your subscription on the 'Basics' tab.

![](https://hackster.imgix.net/uploads/attachments/1474925/image_aXRvD0umPi.png?auto=compress%2Cformat&w=740&h=555&fit=max)

For 'Networking', 'Management', 'Tags' and other items it is OK to leave default settings.

Select 'Review + Create' to review your choices. Click 'Create' button at the bottom to complete IoT Hub creation.

![](https://hackster.imgix.net/uploads/attachments/1474926/image_PbuLLaT4bY.png?auto=compress%2Cformat&w=740&h=555&fit=max)

② Add IoT Device

Click 'Devices' in menu on the left of created IoT Hub and 'Add device'

![](https://hackster.imgix.net/uploads/attachments/1474927/image_qrU44dsLPK.png?auto=compress%2Cformat&w=740&h=555&fit=max)

For 'iothub_II_telemetry_sample' device settings will be made as shown on below picture. For other sample applications these settings may vary.

![](https://hackster.imgix.net/uploads/attachments/1474928/image_bIinuV7T1r.png?auto=compress%2Cformat&w=740&h=555&fit=max)

![](https://hackster.imgix.net/uploads/attachments/1474929/image_CI8XRpwH6e.png?auto=compress%2Cformat&w=740&h=555&fit=max)

Please refer to guide document in corresponding sample application to find appropriate Azure IoT Cloud.

- [iothub_ll_telemetry_sample](https://github.com/Wiznet/RP2040-HAT-AZURE-C/blob/main/_1_APP_TELEMETRY_manual.md)

- [iothub_ll_c2d_sample](https://github.com/Wiznet/RP2040-HAT-AZURE-C/blob/main/_2_APP_C2D_manual.md)

- [iothub_ll_client_x509_sample](https://github.com/Wiznet/RP2040-HAT-AZURE-C/blob/main/_3_APP_CLIENT_X509_manual.md)

- [prov_dev_client_ll_sample](https://github.com/Wiznet/RP2040-HAT-AZURE-C/blob/main/_4_APP_PROV_X509_manual.md)

### **5. Example Settings**

① Setup Wi-Fi configuration

Setup the Wi-Fi network informations in '**socket_startup.c**' in '**WizFi360-EVB-Pico-AZURE-C/examples/**' directory.

```plaintext
/* Wi-Fi configuration */
#define SSID "ssid"
#define PASSWORD "password"
#define SECURITY_TYPE ARM_WIFI_SECURITY_WPA2
```

② Select sample application

As I will be connection using 'iothub_II_telemetry_sample', I will use application in '**WizFi360-EVB-Pico-AZURE-C/examples/iot_demo.c**' as shown below.

```plaintext
// The application you wish to use should be uncommented
//
#define APP_TELEMETRY
//#define APP_C2D
//#define APP_CLI_X509
//#define APP_PROV_X509
```

③ Enter connection string

You can find connection string by clicking on corresponding IoT device.

![](https://hackster.imgix.net/uploads/attachments/1474930/image_7GykYEMpUg.png?auto=compress%2Cformat&w=740&h=555&fit=max)

![](https://hackster.imgix.net/uploads/attachments/1474931/image_W2FEZ8jlbb.png?auto=compress%2Cformat&w=740&h=555&fit=max)

Paste IoT Hub connection string to '**WizFi360-EVB-Pico-AZURE-C/examples/sample_certs.c**'.

```plaintext
const char pico_az_connectionString[] = "HostName=my-rp2040-hub.azure-devices.net;DeviceId=my-rp2040-device-telemetry;SharedAccessKey=Zp2...xQ=";
```

### **6. Example Build & Upload**

① Build

After all required changes are done, press F7 or click ‘Build’ button in status bar of Visual Studio Code.

When build is complete, you can find generated '**azure_mqtt_demo.uf2**' file in '**WizFi360-EVB-Pico-AZURE-C/build/examples/**'

② Upload

Press BOOTSEL button on WizFi360-EVB-Pico on power-up, you should see RPI-RP2 drive. Simply drag and drop 'main.uf2' file.

![](https://hackster.imgix.net/uploads/attachments/1474932/image_2jpqrkYGdo.png?auto=compress%2Cformat&w=740&h=555&fit=max)

### **7. Running Example**

① Connect to the serial COM port of WizFi360-EVB-Pico with Tera Term.

![](https://hackster.imgix.net/uploads/attachments/1474940/image_rlJczRJe8b.png?auto=compress%2Cformat&w=740&h=555&fit=max)

② If example is running normally, in terminal you should be able to see Wi-Fi and Azure IoT Cloud connection steps and transmitted messages.

![](https://hackster.imgix.net/uploads/attachments/1474945/image_0MBinEzKlc.png?auto=compress%2Cformat&w=740&h=555&fit=max)

③ **Azure IoT explorer** can be used to check transmitted messages.

![](https://hackster.imgix.net/uploads/attachments/1474943/image_TiHv4iawPw.png?auto=compress%2Cformat&w=740&h=555&fit=max)

---

Source: https://maker.wiznet.io/austin/projects/connect-wizfi360-evb-pico-to-azure-iot-cloud%21/
