loading
In this instructable you'll learn how to establish communication between the arduino board (or any microcontroller that suports UART) and the Internet through an android device. Once you know how to do that you can control a lamp in your bedroom from the other side of the globe, check temperature in your basement, control a robot... well you get the idea - your imagination is the only limitation.

Essentially the setup is just an android app running on a mobile and communicating with the arduino via bluetooth.
MIT's app inventor allows one to quickly create apps (no coding required) so the mobile can serve as ready made user interface, data-storage device, accelerometer / gyro / GPS / GPRS and Wifi shield all in one. Not bad at all considering that decent android mobiles can be gotten for 40$ or so (or free if it's your own) - that's less than all the wifi shields I've heard of.

This project is based on my previous instructable. I strongly suggest reading it first >>
http://www.instructables.com/id/How-control-arduino-board-using-an-android-phone-a/



I decided to choose Cosm (formerly known as pachube) for this project. I created a simple example app that receives data from the arduino board and sends it to a feed on Cosm website. Users can create feeds,which in turn have datastreams. Each data stream keeps one variable - it can be temperature, sensor reading, string of text and so on. You can access the feed I created for this app here LINK. Feel free to use it for testing purposes.

Cosm API relies on the following request methods for sending & and receiving data:
GET method - to read datastreams
PUT method - to update datastreams

The problem here is that MIT's app inventor supports only GET and POST methods, but I found a way to make POST requests act as PUT requests.


In order to send data you need to use WEB component in App inventor. It requires you to specify the URL of the request and use a PostText method to send a string.

The app I created for this instructable has a default URL - so it works as soon as you run it and enable the checkbox that says 'send data to cosm'. If you want to use your own feed you have to change the URL as follows:

http://api.cosm.com/v2/feeds/YourFeedID/datastreams/YourDatastreamName.csv?key=YourAPIkey&_method=put

Once you have the URL ready copy and paste it into a QR code generator and in the app select the button 'Cosm setup - QR code scanner' to scan the URL. Of course you can manually enter the URL in MIT's app inventor too.



You can download the app and the source file here >>
https://drive.google.com/folderview?id=0B_PfPoEotOF8N2JwT3RSX011SjQ&usp=sharing
 
UPDATE - THIS IS NOW OUTDATED. Mostly because the service itself (cosm) changed name and slightly modified its API. I got it to work though - it's not much different, requires minor changes. Done that, but still have to update it
Dear Manager/Sir, <br>How are you? <br>This is Yoseph from Wuhan Amate Technology Co., Ltd, a leading wireless temperature monitoring system &amp; solution provider from China. <br> <br>Dear Manager/Sir, we came across your esteemed company info on the internet, and guess your esteemed company (specializing in similiar temperature measurement industry or logistics transportation) may have potential need or interest in our Wireless Temperature Monitoring/Measuring System or Solutions, thus we take the liberty to write to you, with hope of self-introduction &amp; communication bridging. <br> <br>A brief introduction of us, Wuhan Amate has established on the base of two Chinese national key universities&rsquo; laboratories professionals in 2001. After more than 10 years development, featured in customer oriented and innovation-driven, we are now ranking among the top three Industrial Wireless Temperature Monitoring System Providers domestically. Our products mainly consist of Wireless Temperature Sensors/Transmitters, Wireless Temperature Display/Monitor/Data Logger/Data Receiver/Collector, Wireless Temperature Workstation/Data Server/Software that constitute the whole wireless temperature monitoring system. <br> <br>Dear Manager/Sir, should you are in the relevant field and have potential need of or interest in our wireless temperature monitoring systems or solutions, please feel free to contact us. If our info doesn&rsquo;t appeal to you, we apologize for this boring &ldquo;Email marketing&rdquo; in advance and please kindly inform us to avoid further &ldquo;junk emails&rdquo;. <br> <br>And finally, we do appreciate your precious time of viewing this letter and looking forward to your favorable response.. <br>Best Regards, <br>Yoseph <br>---------------------------------------------- <br>Yoseph Tsin Marketing Director <br>Overseas Marketing &amp; Sales Dept. of Wuhan Amate Technology Co., Ltd <br>Add.: No.5 Building, Guandong Science Park, Wuhan East Lake National High-Tech Development Zone, Wuhan, Hubei <br>Tel:+86-27-67849619 <br>Fax:+86-27-67849466 <br>Email:yoseph@amate.com.cn Skype:yoseph_amate <br>Backup email:yoseph_amate@hotmail.com (MSN) <br>URL: www.amate.com.cn
Dear Manager/Sir, <br>How are you? <br>This is Yoseph from Wuhan Amate Technology Co., Ltd, a leading wireless temperature monitoring system &amp; solution provider from China. <br> <br>Dear Manager/Sir, we came across your esteemed company info on the internet, and guess your esteemed company (specializing in similiar temperature measurement industry or logistics transportation) may have potential need or interest in our Wireless Temperature Monitoring/Measuring System or Solutions, thus we take the liberty to write to you, with hope of self-introduction &amp; communication bridging. <br> <br>A brief introduction of us, Wuhan Amate has established on the base of two Chinese national key universities&rsquo; laboratories professionals in 2001. After more than 10 years development, featured in customer oriented and innovation-driven, we are now ranking among the top three Industrial Wireless Temperature Monitoring System Providers domestically. Our products mainly consist of Wireless Temperature Sensors/Transmitters, Wireless Temperature Display/Monitor/Data Logger/Data Receiver/Collector, Wireless Temperature Workstation/Data Server/Software that constitute the whole wireless temperature monitoring system. <br> <br>Dear Manager/Sir, should you are in the relevant field and have potential need of or interest in our wireless temperature monitoring systems or solutions, please feel free to contact us. If our info doesn&rsquo;t appeal to you, we apologize for this boring &ldquo;Email marketing&rdquo; in advance and please kindly inform us to avoid further &ldquo;junk emails&rdquo;. <br> <br>And finally, we do appreciate your precious time of viewing this letter and looking forward to your favorable response.. <br>Best Regards, <br>Yoseph <br>---------------------------------------------- <br>Yoseph Tsin Marketing Director <br>Overseas Marketing &amp; Sales Dept. of Wuhan Amate Technology Co., Ltd <br>Add.: No.5 Building, Guandong Science Park, Wuhan East Lake National High-Tech Development Zone, Wuhan, Hubei <br>Tel:+86-27-67849619 <br>Fax:+86-27-67849466 <br>Email:yoseph@amate.com.cn Skype:yoseph_amate <br>Backup email:yoseph_amate@hotmail.com (MSN) <br>URL: www.amate.com.cn

About This Instructable