The example (located in the Adafruit_WICED_Arduino/examples/TLS folder) uses the AdafruitHTTP helper class and TLS to connect to a secure server and request a large file, which is then read using callbacks.
It tries to calculate the throughput for the specified file, which can be 10KB, 100KB or 1MB (indicate the file you wish to use before compiling the sketch).
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"
Next change the FILE_ID flag to indicate which file you want to load. Valid options are '0', '1', or '2':
#define FILE_ID 1 // S3 server to test large files, const char * file_arr[] = { [0] = "/text_10KB.txt" , [1] = "/text_100KB.txt" , [2] = "/text_1MB.txt" , };
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 make a secure (TLS based) connection and request to the Amazon S3 server for the specified file: