Adafruit CC3000 + Webduino = Arduino Web Server over Wifi

General

Adafruit has a CC3000 breakpoint board for $35 on their site. Rather expensive, considering the chip should be $10, but it adds some nice features and they wrote a library for it.

Cut to the chase: for a rather full featured Arduino web server with the CC3000 chip, check out my port of Webduino CC3000 on my GitHub page. REQUIRES my forked version of Adafruit_CC3000

———–

Longer story: I want to add Wifi support to my LED cyr wheel. My goal is to be able to wirelessly control it from an iOS device (iPhone or iPad). I also want to be able to update my LED Pattern Sequence files from my desktop Mac computer. Right now, I manually put them on an SD card, but it seems like I could skip that step and send it over wirelessly. Short range wireless connections on iOS are difficult; bluetooth would be ideal, but has stupid rules to be able to use the API/hardware. Bluetooth LE is newish and supported by the later iOS devices and computers, but my Mac doesn’t support it. Stupidly, my friend Jason gave me the solution for that: just by a dongle. Oh yeah… but anyways, I’m going to try Wifi first.

I now realize the CC3000 chip isn’t ideal because it can’t create an ad-hoc wifi network. It can only join one. That means I have to bring a wireless router with me for circus jobs and have the phone/wheel on the same network. Or setup internet sharing on my phone and connect to the iPhone wireless network from the wheel (that does work, and is okay for now). Bluetooth LE may have been better…but I’m not sure if I can control multiple wheels at the same time (another goal) and synchronize them, as I think bluetooth is a 1-to-1 connection (I could be wrong, I don’t know). I also heard the newer CC3100 chip(or 3200) might have more features; maybe ad-hoc. I should investigate if I ever make my own PCB board that has it on it.

So, using the CC3000 and wifi. I quickly realized I have to make a web server in the wheel. I came up to speed on some new(hah) “protocols” like REST, which seem to be all the rage today. I like stateless, so it seems good. I found a few REST solutions, including aREST (Arduino-REST) that uses CC3000, but it isn’t very flexible.

I then ran across Webduino; it is a few years old, but looks awesome. You can plug in your own handlers for URLs, which is a very simple way to implement REST. So, I ported it over to use Adafruit’s CC3000 breakout board. Check it out: Webduino CC3000

UPDATE: I have been constantly working on this and made Webduino and CC3000 work together better by having a simple state machine. REQUIRES my forked version of Adafruit_CC3000

Tags:


Subscribe
Notify of
guest

2 Comments
Inline Feedbacks
View all comments
andre

Dear corbin,

compiling your code with the latest adafruit cc3000 library gives the following errors:
C:\Users\Andre\Documents\Arduino\libraries\Webduino\WebServer.cpp: In member function ‘void WebServer::begin()’:
C:\Users\Andre\Documents\Arduino\libraries\Webduino\WebServer.cpp:185: error: ‘class Adafruit_CC3000’ has no member named ‘process’
C:\Users\Andre\Documents\Arduino\libraries\Webduino\WebServer.cpp:186: error: ‘class Adafruit_CC3000’ has no member named ‘isReady’
C:\Users\Andre\Documents\Arduino\libraries\Webduino\WebServer.cpp: In member function ‘void WebServer::processConnection(char*, int*)’:
C:\Users\Andre\Documents\Arduino\libraries\Webduino\WebServer.cpp:400: error: ‘class Adafruit_CC3000’ has no member named ‘process’
C:\Users\Andre\Documents\Arduino\libraries\Webduino\WebServer.cpp:401: error: ‘class Adafruit_CC3000’ has no member named ‘isReady’

it seems that isReady and process is used in your code but doesn’t exist in the library.
Did you make additional functionality ? (especially connecting to AP which i can’t find in our code)

Br Andre

corbin

It only works with my version of the CC3000 — you have to pull it to and use it! I’ve also been drastically reworking it the past week; it is *much* better and does async work to allow the main loop not be blocked on stupid delays.

So…pull my version from github.

Subscribe to new posts:

You'll get an email whenever a I publish a new post to my blog and nothing more. -- Corbin

As an Amazon Associate I earn from qualifying purchases.

(c) 2008-2024 Corbin Dunn

Privacy Policy

Subscribe to RSS feeds for entries.

76 queries. 0.157 seconds.

Log in