To spruce up our meetings we wanted a table that not only was classy but served as a memento for our office. We wanted a table that knows if someone is present, is easily accessible over the web, and can show off its lights and hydraulic lift on command. This table would be one of the first stepping stones towards our hackable office.
The CC3000 http://processors.wiki.ti.com/index.php/CC3000 is a Wi-Fi 802.11b/g Network Processor from Texas Instruments. The modified API allows quasi non-blocking behavior for work with RT OS and/or watchdog timers etc.
It is build with arm-none-eabi-gcc v 4.7.3
The CC3000 should have firmware 1.11 for server mode (sockets) there can be issues with socket listen, select, accept and bind otherwise…
Some info: If an interrupt occurs, then the data is being received and handed over to the event handler. The event handler checks the affiliation of the data (e.g. if it is unsolicited) and it checks if the data is what we have been waiting for.
I have also introduced a flow_handler. This completely handles outgoing and incoming data and also the different states of the CC3000. All executive actions are handled there. In the main loop we only set the next action to execute and perhaps handle some of the payload data.(e.g. with recv and send)
There are two important variables: cc3000_desired_state and cc3000_current_state Everytime a command is sent and we expect a return, then cc3000_desired_state is incremented. If we then received the desired code, cc3000_current_state is incremented. If desired state equals current state, then cc3000_is_ready() will return 1 and the next state is set after we processed the data.
At the moment I check for the isr and also if the irq pin is low in the main loop. The goal is to only check for the isr flag, but due to some strange timing things in the CC3000 I have to check for both, because for some reason if I do not print out the debug strings, then the initialisation goes wrong. (The code also works if there is no interrupt at all and the pin is just polled in the main loop)
At any time there will be no wait states. After a command has been executed the program will immediately go back to the main loop. There are more functions (we need a function to request data and one to handle the received payload) and more buffers (which can be reduced). But overall there is more control over what is going on.
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 all-in-one module has low-power WiFi and a microcontroller-friendly interface.
It has been featured in many articles around the web, and the Adafruit’s CC3000 breakout board really makes it easy to integrate this module in any Arduino project. In this tutorial, you will learn how to use this chip for home automation purposes. And in particular, we are going to see how to use this chip to build a simple WiFi-connected weather station. The station will measure two variables: temperature and humidity. But we won’t display the information on an LCD screen, like a weather station you could buy in a store. No, instead, we will transmit the data wirelessly via WiFi to your computer and display it there on a nice interface. Excited? Let’s get started!
Controlling relays is a central piece in any home automation system. With them, you can easily switch on and off any electrical device in your home, like lights. In this project, we are going to see how to wirelessly control a relay from your computer or your smartphone, to realize a wireless-controlled light switch for example. This project is the second part of a series showing you how to use Arduino & the CC3000 WiFi chip for home automation purposes. The first part was dedicated to how to read data wirelessly from a temperature & humidity sensor. Of course, you could use the same pieces of software to control a relay. However, in practice you just can’t use the same principles for this kind of application: it is just too slow. And we are going to see how to speed things up. As usual, the whole code for this project can be found inside our GitHub repository. Let’s dive in !
The CC3000 WiFi module from Texas Instruments is a small silver package which finally brings easy-to-use, affordable WiFi functionality to your Arduino projects.
It uses SPI for communication (not UART!) so you can push data as fast as you want or as slow as you want. It has a proper interrupt system with IRQ pin so you can have asynchronous connections. It supports 802.11b/g, open/WEP/WPA/WPA2 security, TKIP & AES. A built in TCP/IP stack with a “BSD socket” interface supports TCP and UDP in both client and server mode, with up to 4 concurrent socket connections.
If you are interested in Internet of Things projects, this tutorial is a simple and very practical way to get started. The Electric Imp platform was created specifically for Internet of Things devices, and measuring temperature is a great way to learn.
In this tutorial, we will be connecting an Electric Imp to the Adafruit MAX31855 Thermocouple Amplifier breakout board using one of the Serial Peripheral Interface Buses (SPI) available on the Electric Imp. Then we will connect a K-type thermocouple, and send the data to Xively and Twitter.
We believe Internet of Things devices should all come with a well established expectation of what they will and will not do with consumer’s data. In the article we put together the start of what we hope will help this effort – Minimizing Risk Is Easy: Adopt a Bill of Rights
Open is better than closed; this ensures portability between Internet of Things devices.
Consumers, not companies, own the data collected by Internet of Things devices.
Internet of Things devices that collect public data must share that data.
Users have the right to keep their data private.
Users can delete or back up data collected by Internet of Things devices.
Ted Hayes. The State of (the Internet of) Things – Interesting talk, no one seems to like the name “Internet of Things” – Belkin has entered the market with an IoT light switch – lots of protocols, Wi-fi is hard to use.
The folks at Adafruit provide a wonderful, Arduino compatible WiFi board that enables your project to access the internet over your local WiFi. The smallest arduino clone, femtoduino, is capable of using this nifty WiFi board to get you online, fast. Let’s try it out.
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. Excited ? Let’s get started!
Adafruit CC3000 Breakout with Onboard Ceramic Antenna. For years we’ve seen all sorts of microcontroller-friendly WiFi modules but none of them were really Adafruit-worthy. Either they were too slow, or too difficult to use, or required signing an NDA, or had limited functionality, or too expensive, or too large. So we shied away from carrying any general purpose microcontroller-friendly WiFi boards.
The CC3000 hits that sweet spot of usability, price and capability. It uses SPI for communication (not UART!) so you can push data as fast as you want or as slow as you want. It has a proper interrupt system with IRQ pin so you can have asynchronous connections. It supports 802.11b/g, open/WEP/WPA/WPA2 security, TKIP & AES. TCP and UDP in both client and server mode, up to 4 concurrent sockets. It does not support “AP” mode, it can connect to an access point but it cannot be an access point.
We wrapped this little silver modules in a tidy breakout board. It has an onboard 3.3V regulator that can handle the 350mA peak current, and a level shifter to allow 3 or 5V logic level. The antenna layout is identical to TI’s suggested layout and we’re using the same components, trace arrangement, and antenna so the board maintains its FCC emitter compliance (you’ll still need to perform FCC validation for a finished product, but the WiFi part is taken care of). Even though it’s got an onboard antenna we were pretty surprised at the range, as good as a smartphone’s.
Each order comes with one fully assembled and tested breakout and a small stick of header you can use to solder in and plug into a breadboard. We don’t have a detailed tutorial yet but to get you started, we’ve got a fully working Arduino library that is based off of TI’s codebase but adapted for use with the AVR. We also have example code showing how to scan the SSID’s, connect to your access point and run DHCP, do a DNS lookup to IP address, ping a site and connect to a remote TCP socket such as a website and print out the page.
Please note the hardware is good, but the library code does not yet support all of the CC3000′s functionality. SSID scanning, connection, DHCP, DNS lookup, ping, and TCP client connections (eg connect to a website and grab data) all work and are tested with example code. UDP and TCP server connections are not supported yet! As we try to complete the functionality, check or subscribe to the github repo for instant updates. For now we suggest this module and codebase for people with some programming and microcontroller experience.
This is a C# managed driver for the CC3000 Wifi adapter.
CC3000 Managed Driver for .NET MicroFramework is a 100% managed Wrapper for the SPI commands necessary to control the Texas Instruments CC3000 Wifi adapter
The purpose of this driver is to empower the C# developer to debug and add advanced networking features without having to change the firmware or learn C++ (similar to that of mIP). Since this is targeted to embedded devices, this library strives to use a minimal memory footprint. Also, the classes and methods MUST be simple and obvious to use and the critical public methods will be commented properly to allow for proper intellisense.
The smartphone app SMTH (“Send Me To Heaven”) uses a smart phone’s accelerometer to measure the height the phone reaches after you toss it in the air. (The marketing tagline for the app is, “Probably the last game I´ll ever play on my current phone.”) Roger Meike, one of the creators of SunSPOT, a very early Internet of Things device, put together a nice tutorial on just what an accelerometer really measures and the calculations the app performs.
Ever since Twitter shuttered their 1.0 API, a lot of classic Arduino+Twitter projects have been out of commission. The new 1.1 API is robust and secure, but the authentication procedure is asking an awful lot from a little 2K microcontroller. The usual work-around has been to use a proxy server to do the heavy lifting…adding another piece to the puzzle…more code to run, a server to host it and all that entails.
Recently we got Twitter 1.1 API searches working with our original Internet of Things Printer. Now we’ve cracked the nut of sending tweets too…wirelessly over 802.11 this time, direct from Arduino to cloud by way of our CC3000 breakout board, no XBee, no proxy, nothing but net.
Additionally, unrelated to Twitter, there’s a new geolocation example sketch which returns your approximate latitude and longitude based on IP address. Combined with the NTP time sketch, this can provide net-aware home automation projects with sufficient information for seasonal calculations like sun position, insolation or day length without entering coordinates or using GPS.