Hardware Reference
In-Depth Information
#define ADAFRUIT_CC3000_IRQ 3
#define ADAFRUIT_CC3000_VBAT 5
#define ADAFRUIT_CC3000_CS 10
Then, we can create an instance of the CC3000 WiFi chip:
Adafruit_CC3000 cc3000 = Adafruit_CC3000(ADAFRUIT_CC3000_CS,
ADAFRUIT_CC3000_IRQ, ADAFRUIT_CC3000_VBAT, SPI_CLOCK_DIV2);
Now, you will need to modify the sketch to enter your own SSID network name, and the
associated password. If your network is not using WPA2 authentication, you will also have
to change this parameter:
#define WLAN_SSID "yourWiFiNetwork"
#define WLAN_PASS "yourPassword"
#define WLAN_SECURITY WLAN_SEC_WPA2
You will also need to give a name to your 'thing'. Note that all the things on dweet.io
are public by default. It is not a problem here, as we just want to upload and monitor
simple data that is not sensible at all. However, I recommend choosing a complicated name
for the device so nobody else can find it. For example, you can use names like weath-
er_station_l5ir457xda . Once you have a good name, you can enter it inside the
sketch:
#define thing_name "yourThingName"
We also need to define some variables that will contain the measurements made by the pro-
ject:
int temperature;
int humidity;
int light;
In the setup() function of the sketch, we initialize the CC3000 chip:
Search WWH ::




Custom Search