×

SparkFun will be closed on Tuesday, December 24th, and Wednesday, December 25th, in observance of the Christmas holiday. Any orders qualifying for same day shipping placed after 2:00 p.m. (MST) on Monday, December 23rd, will be processed on Thursday, December 26th, when we return to regular business hours. Wishing you a safe and happy holiday from all of us at SparkFun!

Please note - we will not be available for Local Pick up orders from December 24th-December 27th. If you place an order for Local Pick-Up we will have those ready on Monday, December 30th.

Enginursday: Controlling Hardware Through the Internet With M2X

Overview of the related M2X Learn tutorial, which walks users through the process of connecting an Arduino and CC3000 to AT&T's M2X service.

Favorited Favorite 0

Tomorrow, I am flying out to Las Vegas to help at the AT&T Code for Car and Home hackathon, which is part of the Super Mobility Week conference.

Pretty, ain't it?

That's right. Vegas, baby!

...OK, so in all seriousness, I won't be partying much.

The Super Mobility Week is a week-long conference in Las Vegas that focuses on mobile and connected technology. AT&T's hackathon takes this one step further and asks developers to create some kind of app, device, program, etc. with the focus on a connected home or car (or both!).

SparkFun is one of the many sponsors at the hackathon, and most of the sponsors are bringing hardware or software kits for people to hack on.

SparkFun is including the CC3000 WiFi shield in its kit of parts for people to play with. This shield allows Arduino-type devices to connect to the Internet. Out of the box, the CC3000 can connect to a WiFi router and create basic TCP connection to a server. Luckily, a TCP connection allows us to send and receive RESTful API calls (e.g. GET, PUT, POST, DELETE). That means we can talk to any service that implements the RESTful API.

AT&T's M2X happens to be one of those services. Similar to other Internet of Things services (data.sparkfun, Xively, Electric Imp, etc.), M2X offers a place to store data, so long as your connected device can communicate with REST-style HTTP calls. For example, I can record the temperature in my office for a period of time and look for trends.

My office temperature on M2X

It's starting to get a bit toasty in here...

A neat trick with M2X is that you can perform a GET command to retrieve the information in a data stream followed by a DELETE to remove all of that data. If these commands are used in conjunction, you can create a very crude Producer-Consumer model with the M2X stream. You can have one device logging values to a data stream and another device (on the other side of the planet) consuming those values to perform some action.

Here, I have set up a basic LED circuit that turns off whenever it sees a "0" in an M2X data stream and turns on for any other value.

M2X LED controller

It's the NEW blinky!

If you would like to try connecting the CC3000 to M2X, here is the step-by-step process for creating an M2X account and connecting some hardware. Also, here is a wishlist of the parts in the developer kits:

M2X-with-CC3000 example code can be found on my GitHub page.

Finally, if you happen to be in Vegas this weekend, stop by the Cosmopolitan Hotel and say hi! I'll do my best to be wearing a bow tie...


Comments 0 comments

Related Posts

Recent Posts

Tags


All Tags