WiFly Shield Hookup Guide
WiFly Library and the Terminal Sketch
WiFly Shield Library
To aid in the use of the WiFly shield, several authors have contributed to making a WiFly library. It has gone through several iterations, and, although it is not perfect, it allows the end user to easily get the WiFly up and running.
Interaction with the WiFly Shield will be done via the Arduino Serial monitor or a terminal program of your choice. In order to do this, we’ll need an example sketch called SpiUartTerminal from the WiFly Shield github page. Use the following steps to install the library and sketch in the Arduino environment.
- Download the library code as a zip file from the WiFly Shield github page.
- Unzip the downloaded file into your .../arduino/libraries/ folder
- Rename the unzipped folder “WiFly”. This must be done because the Arduino environment does not accept library folder names with dashes in them.
- Start the Arduino IDE (or restart if it is open).
The Terminal Sketch
Once you’ve installed the library, navigate to the example sketch
Load the sketch in tot he Arduino IDE. This sketch allows the user to communicate with the WiFly Shield directly through the Arduino serial monitor or any other terminal emulator.
Upload the sketch to the Arduino board, and open the Arduino serial monitor (or terminal emulator of your choice). Make sure the baud rate is set to 9600, 8-N-1-NONE.
The Arduino should now print out an info menu with instructions on how to use the sketch. We’re now ready to configure the WiFly to connect to a network.
Please note that you will need to use this sketch a lot when working with your WiFly Shield. Anytime this tutorial references talking to the WiFly module, assume that it is referring to using this sketch to do so.
If you are experiencing problems with you WiFly Shield, make sure you are using the most up to date version of the library from GitHub. The Arduino IDE is constantly evolving, and, occasionally, the newest version might not work with existing libraries. If you can't get the WiFly shield to work with the latest version of the Arduino IDE, you may have to revert to an older version of the IDE. If you are using Arduino 0023 or older, you will want to use the pre-Arduino 1.0 version of the library.
If you are seeing data that looks mostly right but is jumbled in places when you use the terminal sketch, the problem is most likely related to not having the correct library matched up with the correct version of the IDE.