This page will get you started with the aREST Arduino library using the CC3000 WiFi chip, for example using an Adafruit CC3000 breakout board or a CC3000 WiFi shield.
aREST can be used to control an Arduino board using the CC3000 WiFi chip, by communicating with the chip & Arduino via HTTP requests. The Arduino board basically runs a tiny web server that accepts incoming commands and process them via aREST. You can then control your Arduino board via any web browser, via cURL calls, or via web-based applications, for example applications based on Node.JS.
Hardware & Software Requirements
You will need a board that is compatible with the CC3000 WiFi chip, like an Arduino Uno that was used for this guide. You will also need a CC3000 breakout board, one LED, one 220 Ohm resistor, a breadboard, and some jumper wires.
On the software side, you will need the latest version of the Arduino IDE (1.5.x):
You will need to get & install the aREST Arduino library:
You will also need the CC3000 library:
Finally, you will need the CC3000 MDNS library:
First, place the CC3000 board on the breadboard. Then, 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.
For the LED, simply connect it in series with the resistor, with the longest pin of the LED connected to the resistor. Then, connect the remaining pin of the resistor to pin 6 of the Arduino board, and the remaining pin of the LED to the GND pin.
Using aREST with WiFi
You can now open the Arduino IDE, and select the WiFi_CC3000 example in the aREST examples. Save the sketch somewhere, and modify the WiFi name & password inside the sketch. Then, upload the sketch to the Arduino board. Go to your favorite web browser, and type:
This will make pin number 6, which is connected to the LED, to an output. After that, type:
This will make a digitalWrite() command to pin 6, and it will turn the LED on. If that works, it means that aREST is working correctly.
If this is not working at this point, don’t panic. It can just be that the mDNS service included in the sketch is not working. Open the Serial monitor to get the IP address of your board. Then, you can simply use the same commands as before with the IP address first, for example: