---
title: "Connect W5100S-EVB-Pico to Azure IoT Cloud!"
url: "https://maker.wiznet.io/WIZnet/projects/connect-w5100s-evb-pico-to-azure-iot-cloud%21/"
markdown_url: "https://maker.wiznet.io/WIZnet/projects/connect-w5100s-evb-pico-to-azure-iot-cloud%21/md"
type: "UCC: User Created Content"
author: "Austin"
author_url: "https://www.hackster.io/giung-kim/connect-w5100s-evb-pico-to-azure-iot-cloud-0a574c"
editor: "WIZnet"
editor_url: "https://maker.wiznet.io/"
original_author: "Austin"
original_url: "https://www.hackster.io/giung-kim/connect-w5100s-evb-pico-to-azure-iot-cloud-0a574c"
published: "2023-02-03"
language: "en"
hardware: ["WIZnet W5100S-EVB-Pico"]
likes: 4
views: 689
comments: 0
source: "WIZnet Makers (https://maker.wiznet.io/)"
---

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

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

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

## Components

- **WIZnet W5100S-EVB-Pico** x 1 ([docs](https://docs.wiznet.io/Product/Chip/Ethernet/W5100S/w5100s-evb-pico))

## Article

In this document I will provide instructions how to connect latest WIZnet’s product – **W5100S-EVB-Pico** to **Azure IoT Cloud**.

I will use **RP2040-HAT-AZURE-C** provided by WIZnet.

- [RP2040-HAT-AZURE-C](https://github.com/Wiznet/RP2040-HAT-AZURE-C)

### **1. Environment Preparation**

Before starting, it is necessary to setup your environment for W5100S-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 PreparationW5100S-EVB-Pico** is a development board that is built on high-performance, low-price MCU **RP2040** and WIZnet’ ethernet chip **W5100S**.

More details can be found at below link:

- [W5100S-EVB-Pico](https://docs.wiznet.io/Product/iEthernet/W5100S/w5100s-evb-pico)

W5100S-EVB-Pico is pin compatible to Raspberry Pi Pico. But keep in mind that pins GPIO16 ~ GPIO21 are used for SPI communication between RP2040 and W5100S.

SPI related settings can be checked and changed in ‘**RP2040-HAT-AZURE-C/port/ioLibrary_Driver/w5x00_spi.h**‘

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

### **3. 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 - Azure IoT SDK 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/1395708/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/1395709/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/1395711/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/1395712/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/1395715/image_bIinuV7T1r.png?auto=compress%2Cformat&w=740&h=555&fit=max)

![](https://hackster.imgix.net/uploads/attachments/1395716/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)

### **4. Example Settings**

① Select sample application

As I will be connection using ‘iothub_II_telemetry_sample’, I will use application in ‘**RP2040-HAT-AZURE-C/examples/main.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/1395717/image_7GykYEMpUg.png?auto=compress%2Cformat&w=740&h=555&fit=max)

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

Paste IoT Hub connection string to ‘**RP2040-HAT-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=";
```

### **5. 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 ‘**main.uf2**‘ file in ‘**RP2040-HAT-AZURE-C/build/examples/**‘

② Upload

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

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

### **6. Running Example**

If example is running normally, in terminal you should be able to see W5100S-EVB-Pico network information, connection steps and transmitted messages.

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

![](https://hackster.imgix.net/uploads/attachments/1395722/image_lSPxBl2Qyj.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/1395723/image_CWRhMLEReu.png?auto=compress%2Cformat&w=740&h=555&fit=max)

---

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