If you found this article after doing a search on Google, welcome! On this website you will find plenty of content around DIY home automation using open-source hardware. Enjoy the article!

As open-source hardware users and makers, we love playing with new chips, boards and tools. And there is one chip which is quite popular these days: the CC3000 WiFi chip from TI. This chip comes with many promises: cheap (around $10), easy to use, low-power … It was featured in many articles around the web, but somehow it was quite hard to use with Arduino as there was no breakout board or library available.

Luckily, Adafruit solved that for us with a nice breakout board and a working library for Arduino. In this article, I will show you how to use this chip for home automation purposes. Remember that weather station project? We are going to do the same: measure the temperature and the humidity. But this time we won’t display the information on an LCD screen. Instead, we will transmit the data wirelessly via WiFi to your computer and display it there. We will also use a library called aREST to really simplify the whole project. Excited ? Let’s get started!

Hardware & Software Requirements

The whole project is based on the Arduino platform, so of course you will need an Arduino board. I really recommend using the Arduino Uno board for this project, as it is the only board that is currently compatible with the CC3000 library at the time this article was written.

Then, you need the famous CC3000 chip. There are also many alternatives to do that. What I recommend is using the Adafruit CC3000 breakout board, which is the only one I tested that worked without problem. It is nice and compact, has voltage regulators onboard, as well as an onboard antenna. I tried the official TI CC3000 board, but it never worked properly, and you have the use level shifters as well (the CC3000 works with 3.3V, and the Arduino Uno with 5V). The other alternative is to make your own breakout board, there are many PCB layout available online.

You also need a DHT temperature & humidity sensor. I used the DHT11 sensor, but this project would also work fine with a DHT22, you would just have one line of code to change. You will also need a 10K Ohm resistor to be used with the DHT sensor.

Finally, you need a breadboard and some jumper wires to make the connections between the different parts.

This is a list of all the components that are required for this project:

On the software side, you need the usual Arduino IDE. Note that for this project, you need the Arduino IDE in version 1.5.x, because this version drastically reduce the size of the final Arduino sketch when uploaded to the board. With 1.0.5, it will not work because the sketch would be too big after compilation.

You will also need the Adafruit’s CC3000 library, the CC3000 MDNS library, the aREST library, as well as the DHT sensor library. To install a library, just download the folders, and put them into your /Arduino/libraries/ folder.

Hardware Configuration

The hardware configuration for this project is actually not that complicated, thanks to the good informations that you will find on the CC3000 breakout board. Connect the IRQ pin of the CC3000 board to pin number 3 of the Arduino board, VBAT to pin 5, and CS to pin 10. Then, you need to connect the SPI pins to the Arduino board: MOSI, MISO, and CLK go to pins 11,12, and 13, respectively. Finally, take care of the power supply: Vin goes to the Arduino 5V, and GND to GND.

The DHT sensor is easier to connect: just plug the pin number 1 to the Arduino’s 5V, pin number 4 to GND, and pin number 2 to Arduino pin 7. Finally, put the 10K resistor between the sensor pins number 1 and 2.

The following picture summarizes the hardware connections:

Make a WiFi Weather Station With Arduino and the CC3000 chip

Testing the WiFi chip

As this tutorial is really about the CC3000 chip, I don’t want to spend too much time on the DHT sensor. You will find a good test sketch inside the library, and I also included a test sketch inside the project’s GitHub repository.

Note that in this tutorial, we will only cover a tiny part of the possibilities offered by the Arduino platform. If you want to learn more about Arduino, I recommend following the excellent Arduino Step by Step course on Udemy.

To see if your WiFi chip is correctly wired and operational, I recommend to use the test sketches that come with the Adafruit library. I used for example the one called WebClient. Just open it from the library’s folder, and save it to a new file (you need to be able to modify the sketch to enter your WiFi network name & password). Then, modify the sketch with the correct data for you WiFi network, and upload to the board. You can then open your serial monitor, and if everything was wired correctly (and your Internet connection is working!) you should see your Arduino connecting to the web, then connecting to the Adafruit’s website, and printing some information.

Putting it All Together

We can now dive into the home automation part of this project. The goal is to get the sensor’s data, send it via WiFi to a server (running on your computer), and display the information. The code for each part is quite long, so I will only discuss the important parts. To get the complete code, simply go to the GitHub repository of the project.

First, the Arduino sketch. If you had a look at the example file from Adafruit, you should already have an idea of what are the important parts of the sketch. Of course, you need to import the right libraries:

#include "DHT.h"

Then, you need to define inside the code what is specific to your configuration, like your WiFi name & password:

#define WLAN_SSID "yourNetwork"
#define WLAN_PASS "yourPassword"

We can then create the CC3000 instance:

Adafruit_CC3000 cc3000 = Adafruit_CC3000(ADAFRUIT_CC3000_CS, ADAFRUIT_CC3000_IRQ, ADAFRUIT_CC3000_VBAT,

And an instance of a server that will run on the Arduino microcontroller:

Adafruit_CC3000_Server restServer(80);

We also create an instance of the aREST library:

aREST rest = aREST();

And let’s not forget to create the instance for the DHT sensor:


We also need to create two variables that will contain the measurements of the sensor:

int temperature;
int humidity;

In the setup() part of the sketch, we need to initialize the DHT sensor:


We also have to expose the two measurement variables to the aREST API:


After that, we connect the CC3000 to the network:


Before the end of the setup() function, we start the server and display the connection details, like the IP address of the CC3000 chip:


In the loop() part, we need to get data from the sensor, and store it in the variables we defined before:

temperature = (uint8_t)dht.readTemperature();
humidity = (uint8_t)dht.readHumidity();

Then, we simply handle the incoming request with:

Adafruit_CC3000_ClientRef client = restServer.available();

Once again, to get the complete code, just go to the GitHub repository of the project.

You can now upload the code to your Arduino board. Make sure that you modified the code with your own WiFi name and password. Then, we are going to test it by making call to the aREST API. Go to your favorite browser, and type:


You should be greeted with the following message:

{“temperature”: 24, “id”: “1”, “name”: “weather_station”, “connected”: true}

Congratulations, you can now read the value of the temperature via WiFi!

If it doesn’t work at this point, don’t worry: it can just be that the mDNS service (that allows you to access the project using arduino.local) is not working on your computer. To get around that, open the Serial monitor of the Arduino IDE. Wait a moment, and you should see the IP address of the board being printed:

IP Addr:

You can then use the IP address directly to access the board:

It’s now time to look at the interface part. The code is based on the aREST.js library, and it is made so you have no line of code to modify. This interface will simply get the data from the board by making calls to the aREST API just as we did before, and then display this data on a page.

First, download the code from the GitHub repository of the project. Then, go inside the interface folder, and find a file called interface.html. This is the file you’ll need to open in a moment.

That’s all for the software part, so it is time to test it out! Upload the sketch to the Arduino board, open the serial monitor to check that everything is working correctly, and open the interface.html file in your favourite browser. Wait a bit so that the board can send the first set of data, and this is what you should see:

Make a WiFi Weather Station With Arduino and the CC3000 chip

You can play with the sensor to see the data being automatically updated on the page. Congratulations, you just built a simple WiFi-connected weather station! I used temperature & humidity as the “data” in this tutorial, but it can be anything you want: data from a motion detector, door/window contact …

You can also modify the interface part so that it sends some information back to the board, for example to control a relay. If you want to learn more about how to use WiFi for your home automation projects based on Arduino, I invite you to check our main digital product, Home Automation with Arduino.

As always, please comment below if you have any question, a suggestion on how to improve the article, or if you find some nasty bugs in the code!