Once you have soldered headers onto the shield you can plug it into your microcontroller

For the initial demo you can use an Atmega328P or ATSAMD21-based Arduino compatible. That means a UNO/Metro or Zero/Metro M0. We strongly recommend a ATSAMD21/Zero based board as the library is quite large and takes up nearly all the memory on a '328.

Install the Library

We will start by installing the official Arduino WiFi101 library.

We want the latest version so visit the Library Manager

Type in wifi101 and when the library comes up, click Install or Update to make sure its the most recent one!

If you're not familiar with installing Arduino libraries, please visit our tutorial: All About Arduino Libraries!

Restart the Arduino IDE.

You may need to use Arduino 1.6.5 or later

Check Connections & Version

 Before we start, its important to verify you have the right setup & firmware version.

Load up the WiFi101->CheckWifi101Firmware sketch

Upload to your Arduino and open up the Serial Console at 9600 baud:

You should see the firmware version. If your version has not PASSED no big deal - simply follow this page to update your firmware!

If you have version 19.3 or less, the firmware is too old

If you get not response, the firmware is either waaay to old, or something is amiss with your wiring!

Scanning WiFi

Now that you have the right firmware version, lets scan for network!

Run the WiFi101->ScanNetworks example to see a list of available visible networks

Connect & Read Webpage

OK finally you get to connect and read some data!

Open up the WiFi101->WiFi101WebClient example, then edit the ssid and pass variables to contain your network and password

It will connect to the website in server and read the webpage manually:

That's it! pretty easy, huh? There's other examples you can try such as server mode, UDP data transmission & SSL

Changing the control pins?

If you are not using the default pin configuration on the shield, you'll need to setPins to tell the library where to find the control pins.

You can call setPins with the new CS, IRQ and Reset pin. If you are using the Enable pin, pass that in fourth:

WiFi.setPins(int8_t cs, int8_t irq, int8_t rst, int8_t en = -1);

Like so:

This guide was first published on Nov 21, 2017. It was last updated on Mar 08, 2024.

This page (Wiring & Test) was last updated on Mar 08, 2024.

Text editor powered by tinymce.