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.
Download: file
#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)
Download: file

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:
Download: file
//  #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:
This guide was first published on Sep 16, 2013. It was last updated on Sep 16, 2013. This page (Using the CC3000) was last updated on Sep 21, 2019.