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 the Arduino library manager.

Open up the Arduino library manager:

Search for the Adafruit CC3000 library and install it

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

This guide was first published on Sep 16, 2013. It was last updated on Mar 08, 2024.

This page (Using the CC3000) was last updated on Mar 08, 2024.

Text editor powered by tinymce.