AnduinoWiFi Getting Started




Motivation

Implementing an IoT prototype utilizing an Arduino that doesn’t natively support WiFi can be cumbersome. Sure there are some pretty good options for native support. The MKR1000 natively supports WiFi, but this ease comes at a price. The SAMD21 is essentially half as powerful as the SAM3X8E on the Due. Why not have the best of both worlds?

AnduinoWiFi Getting Started

Give me the speed, storage, and excessive amount of I/O available on the Due with the same WiFi101 capabilities and ease of use as the MKR1000? Wouldn’t it also be nice to prevent your prototypes from looking like a labyrinth of wires and breadboards?




Enter AnduinoWiFi! Sure once you’ve connected the WiFi shield you’ve stolen away some I/O and shield real estate. Add on other critical IoT components like NFC, EEPROM, an LCD Display, and you usually start living on multiple breadboards. With our shield we’ve crammed it all onto one shield! (without compromising too many I/O pins) Let’s dig in and start testing out some of the built in features and components!

Getting Started

So you’ve just unboxed your shiny brand new anduinoWiFi shield, what’s next?

Whenever I buy something new I usually skip reading the user manual and immediately push all the buttons to see what they do. After stepping through this getting starting guide you’ll have essentially “pushed” all the buttons and explored the 4 major components found on the anduinoWiFi shield.

  • WiFi connectivity (ATWINC1500)
  • RFID/NFC card scanning (PN532)
  • EEPROM storage (ST-M24256)
  • LCD Display (160x128px ST7735)

Let’s kick things off with arguably the most important component of any IoT device, internet!

READ  “Smart” lithium-ion battery would warn users if it is going to ignite

**For each component you’ll need to download and install libraries in the Arduino IDE. You can download utilizing the ‘Manage Libraries’ option within the IDE or by downloading from GitHub and transferring the files to your Arduino>>libraries directory. For the anduino libraries you’ll want to make sure you include the AnduinoPins Directory as well. This takes care of setting up the I/O for the shield behind the scenes If you haven’t done this before, check out Arduino’s step-by-step guide installing libraries.

Getting Connected With the ATWINC1500

The anduinoWiFi ships with the same WiFi module as the Arduino WiFi shield, the MKR1000, the Adafruit Feather M0 WiFi, just to name a few. This means that we can employ the same WiFi101 Arduino Library, community support, and documentation to get our prototypes working quickly. The ATWINC1500 is wired up just like the WiFi101 shield, so we can use any WiFi101 library example without any modification or adjustment for a different pinout.

To test out WiFi let’s attempt to connect to a web server utilizing https. Once you download and install the WiFi101 library navigate to File>>examples>>WiFi101>>WiFiSSLClient. Open the sketch and enter your WiFi SSID and Password here.

char ssid[] = "yourNetwork"; //  your network SSID (name) 
char pass[] = "secretPassword";    // your network password (use for WPA, or use as key for WEP) 

If you’d like to change the web server you connect to just modify this variable here:

char server[] = "store.andium.com";    

Here’s where we connect to store.andium.com on port 443(HTTPS) and GET the home page:

 if (client.connect(server, 443)) { 
Serial.println("connected to server"); 
// Make a HTTP request: 
client.println("GET / HTTP/1.1"); 
client.println("Host: store.andium.com"); 
client.println("Connection: close"); 
client.println(); 
} 
} 

So compile and run the code, open up your serial monitor and lets take a look! If all goes well you’ll see HTML returned to the terminal looking similar to what’s below!

<!--[if IE 9]> <html class="ie9 no-js" lang="en"> <![endif]-->
<!--[if (gt IE 9)|!(IE)]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta name="theme-color" content="#00cbf5">
<link rel="canonical" href="https://store.andium.com/">
<link rel="shortcut icon" href="//cdn.shopify.com/s/files/1/1789/9879/files/andiumfavicon_32x32.png?v=1487455314" type="image/png">
<title>
Andium Marketplace
&ndash; Andium Inc.
</title>
<meta name="description" content="Turn your Arduino into an andiumNode and start prototyping IoT solutions utilizing your favorite hardware!">

That’s it! You’ve just tested out your anduinoWiFi’s ATWINC1500 and made a request to an HTTPS web server. Feel free to try any of the other WiFi101 example sketches, enter your WiFi credentials and give it a spin. When you’re ready to move on, lets test the NFC!

READ  Add Linux, WiFi, Ethernet and USB to Arduino

RFID Card Scanning with the PN532

The anduinoWiFi shield ships with NXP’s PN532 and a uFl connected RFID antenna used for scanning passive RFID tags at 13.56MHz. The anduinoNFC library also supports the NDEF format which we put to use in some other examples.

Read more: AnduinoWiFi Getting Started




Leave a Comment

*
= 4 + 5

(Spamcheck Enabled)

Read previous post:
MAGIC PIXEL – Bluetooth full color LED display
MAGIC PIXEL – Bluetooth full color LED display

MAGIC PIXEL Magic Pixel is a universal and handy Bluetooth LED display, which we've been developing with focus on ease...

Close
Scroll to top