An Arduino Wi-Fi REST Interface with the CC3000

An Arduino Wi-Fi REST Interface with the CC3000 — photograph from the project archive.

This Arduino experiment exposes a small REST interface through an Adafruit CC3000 Wi-Fi module. The project combines the CC3000 driver, aREST, mDNS support and a watchdog, with a short video showing the original LED-control demonstration.

How the project works

The sketch joins a WPA2 network and runs an HTTP server on port 80. aREST publishes temperature and humidity variables and registers an LED-control function. The values 24 and 40 are fixed demonstration data in this source, rather than readings from attached sensors.

A four-second watchdog is enabled, and loss of connectivity is handled by allowing a reset. That provides a simple recovery mechanism, although long network operations and startup failures still need to be considered when adapting the application.

Hardware and configuration

ItemIn the supplied code
CC3000 IRQD3
CC3000 VBAT / CSD5 / D10
LED functionDigital output D6
Serial monitor / server9600 baud / HTTP port 80

Working with the supplied code

Supply your own network settings locally. The archived sketch references WiFi_CC3300.h; verify that include and the matching dependency before compiling. Keep any passwords out of published examples.

The LED function calls digitalWrite, so ensure the selected pin has been configured as an output before using it. Use the example on a trusted local network while developing: the saved sketch does not implement application authentication. The two WiFi_CC3000 sketch directories are variants to compare, not two components to compile together.

Video demonstration

Arduino WiFi CC3000 — Ovidiu Carstea on YouTube

Source code and project files

Browse this project on GitHub. The project sketch and its aREST library are now available together in the project folder. Compare the project sketch with the bundled CC3000 example when adapting the REST interface.

Download the used libraries (ZIP, 14.7 MB). This collection preserves the archived library versions; Wi-Fi settings and API credentials use placeholders for you to configure locally.

The networking example uses Adafruit CC3000 and aREST libraries; preserve their licenses when adapting it. The project sketch and bundled library example are linked above.

These notes describe the archived source and project media. The sketches have not been rebuilt or tested on hardware for this article.

Scroll to Top