Using the CC3000

Make sure your Arduino is powered by a 1 amp or higher rated external power supply when using with the CC3000! Powering an Arduino + CC3000 from a computer/laptop USB port will lead to unstable behavior and lockups because the USB port can't supply enough power!
Use the Arduino 1.6.4 version or newer with the CC3000, EXCEPT for the firmware update sketches in the library examples folder. Use 1.0.6 for those!

Download the Library

We will start by downloading the Adafruit CC3000 Library, available from our GitHub repository.

You can download the latest ZIP file by clicking the button below.
Rename the uncompressed folder Adafruit_CC3000. Check that the Adafruit_CC3000 folder contains Adafruit_CC3000.cpp and Adafruit_CC3000.h; also ccspi.cpp, ccspi.h, an examples folder, and a utility folder

Place the Adafruit_CC3000 library folder your sketchbookfolder/libraries/ folder. You may need to create the libraries subfolder if its your first library. Restart the IDE. You can figure out your sketchbookfolder by opening up the Preferences tab in the Arduino IDE.

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

Sample Sketches

The Adafruit CC3000 Library contains several example sketches, demonstrating different capabilities of the CC3000 along with some useful programming techniques.

To run the sample sketches, you'll have to edit them to include the SSID and password of your access point.
#define WLAN_SSID       "myNetwork"        // cannot be longer than 32 characters!
#define WLAN_PASS       "myPassword"
Also, make sure that the right wireless security scheme is selected (unsecured, WEP, WPA, or WPA2)
// Security can be WLAN_SEC_UNSEC, WLAN_SEC_WEP, WLAN_SEC_WPA or WLAN_SEC_WPA2
#define WLAN_SECURITY   WLAN_SEC_WPA2

WEP with HEX Passphrases

If you are using WEP security, and your passphrase is a series of HEX digits, you can't simply enter it as a literal string. Instead you have to define is as an actual binary sequence.
For example, if your passphrase is 8899aabbccdd, you would define it as follows:
//  #define WLAN_PASS       "8899aabbccdd"  //don't do it this way!
//do it this way:
const char WLAN_PASS[] = {0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0x00};
Remember to append 0x00 to the declaration, after the passphrase, as shown in the example!
Be aware the library does not currently support WEP passphrases with 0x00 null characters! See this bug for more details: https://github.com/adafruit/Adafruit_CC3000_Library/issues/97
Last updated on 2015-12-15 at 04.25.15 PM Published on 2013-09-16 at 01.57.40 PM