This example (located in Adafruit_WICED_Arduino/examples/HTTP) will connect to an HTTP server and read the specified page using 'callbacks' (as opposed to using polling).
Setup
Set your AP details using the WLAN_SSID and WLAN_PASS flags, setting them to the values used by you own access point:
#define WLAN_SSID "YOUR SSID HERE" #define WLAN_PASS "YOUR SSID KEY HERE"
Set the domain name or the IP address, the page and the port that you wish the resolve using the following variables:
#define SERVER "www.adafruit.com" // The HTTP server to connect to #define PAGE "/testwifi/index.html" // The HTTP resource to request #define PORT 80 // The TCP port to use
Compile and Flash
You can then compile and flash your sketch to the WICED Feather using the 'Download' arrow icon at the top of the IDE:
You should see the USB DFU progress as the update advances, and there will be a 'Done Uploading' message in the top left of the status bar when you are done:
Testing the Sketch
Wait a few seconds for the USB CDC serial interface to enumerate, and then open the Serial Monitor using either the Serial Monitor icon in the upper-right of the IDE or via Tools > Serial Monitor:
This will cause the WICED Feather to attempt to connect to the access point, and then it will attempt to retrieve the specified web page:
Text editor powered by tinymce.