One day you put your toaster on a social networking site. And then on another day you find out that your toaster has more friends than you.
This little story sounds made up. Well, it’s not.
My toaster has had a Twitter page since December 2008, tweeting the status of my toast making habits for all of the world to follow. On occasion people even write to the toaster to ask what it’s toasting. Oddly enough, it can tell you.
I get asked, “Why have your toaster on the Internet?” Well, it’s a starting point for future projects and part sarcasm. I have been working on gizmos, web control, and power / resource management projects with my friend Jason Winters of ioBridge for over a decade. One day I had the idea to overlay appliance usage data onto a graph of my power consumption for my house. My theory is to use this appliance meta data to reduce the power I use everyday by pointing directly to the power hogs. It’s a start to my internet of things at my house. If you want to get start your own Skynet, visit Wired’s Wiki on making things talk. I use the IO-204 control and monitor module from ioBridge.com.
I took the leap and bought an Arduino from LiquidWare. Arduino is an open-source microcontroller that has a processor, some digital I/O pins, and analog inputs. You can create little standalone programs that monitor inputs, control LEDs, and pretty much anything that you dream up. My favorite projects are ones that involve the Internet. A microcontroller is rather simple by itself, but what if it could use the web to get answers, send an email, maybe update my Twitter status? That means there is an unlimited number of projects ahead – Microcontrollers collaborating in cyberspace. The missing link for the web part is the ioBridge IO-204. I know you are no stranger to the IO-204, but for those of you who have not heard. The IO-204 sits on my network and relays data from its channels to ioBridge.com servers and back into my network. It allows for remote control and monitoring without network configuration and programming. One of the expansion boards is a two-way serial board that accepts serial strings and connects them to APIs of web services that ioBridge interfaces to and sends back responses. For instance, I can send the commands, “[[[calc|9*9]]]” and this returns 81. OK, maybe not impressive on the surface, but that result came from Google Calculator. Anything Google Calculator can solve, your microcontroller has access to those results. For more examples, visit the Serial Web Services API on the wiki.
Message Center Project
I wanted to combine these two worlds with a sample project – maybe it will inspire you to come up with something better, spark some ideas that you have. I have my Arduino measuring my outside temperature here in Pittsburgh, which is an analog input scaled to Fahrenheit. At any moment I can press a button and get the temperature on the LCD screen – no Internet required. Since I have been planning a work trip to Atlanta, I also wanted to compare my temperature with hot-lanta’s. So, my project solves that. Using the “weather command”, I am able to get the weather anywhere in the world by zip code or city name.
I added a few more things to the message center. With another button, I can get Google’s current stock price. My strike price was $405, so I have been watching it closely. If it gets below $405, I get an automatic email from my message center. The stock quote comes from the Yahoo Financials API.
I have one more button that emails me a secret message when it’s pressed. I put this in here for when my mom comes into my room from when I am on the road. It’s aptly labeled, do not press. Next time, I will hook it to a light sensor in the basement to catch her when she turns on my lights. I am sure you all have the same issues with your mom.
The Arduino requires some c-like programming and I wanted to include the sketch for you to steal and use for your projects. You will see how I send the serial commands from the Arduino to the IO-204 using the UART serial connection (pins 0/1) and receive and parse the incoming results. I use a SoftwareSerial port for the LCD results. The pushbuttons are software debounced and use pull-up resistors for solid digital connections. The LED’s linked to each button use a 330-ohm resistor to protect them. I was aided by the Arduino Inputs tutorial on Ladyada.net, Debounce Tutorial, and the ioBridge Wiki / Forum. Please let me know if you have any questions, maybe I can help. I have learned a lot about handling strings on the Arduino.
// // Message Center using Arduino and the ioBridge IO-204 // // An open-souce Shadowlord Project // www.IamShadowlord.com
It’s simple, but I hacked together a power supply for the Arduino, which gets power from USB or a coaxial input from a transformer. I wanted to only run one brick, wall wart, so I hacked a USB cable. There are 4 wires in the USB cable (from pinouts.ru):
The IO-204 has a regulated 5VDC and ground (up to 1A – 4A total draw depending on supply) on each channel, so using a terminal strip, I connected the VCC and GND to a cut in half USB cable.
“Web 2.0” is a bonafide buzzword. What happened to versions 1.1 through 1.9? What does 2.0 mean exactly? To me, Web 2.0 defines the separation of static web pages to truly dynamic and useful web applications. There will be other versions, but this is the first clear step in my mind.
Examples of Web 2.0 applications are Google Mail, Basecamp Project Manager, and UberNote – Note Management.
I recently became aware of UberNote by reading through articles at The Tech Brief. The UberNote application (almost wanted to call it software because you forget that this is a web application since it is so useful and easy to use) allows for quick note-taking, advanced editing, and intuitive tagging.
I am a note-taker. I always have a notebook in my pocket, so I never miss a fleeting idea – maybe one about how toothbrushes with a blue strip fade prematurely while using whitening toothpaste – wouldn’t want to lose that gem. There are times that I email thoughts to myself, leave voice mails on my Skype (which are the only voicemails I get), write on the back of a placemat at a diner – you get the idea. After getting invited to use the UberNote site, I have been putting my thoughts online and have found this a way to keep track of my little thought nuggets that will return literally tens of dollars someday in the future.
I recommend trying UberNote, joining their forums, and helping them shape their initial product offering. Check it out soon, so you don’t miss Web 2.0 and before the Web moves to 3.0 and maybe even Web 3.0 beta.