1) A Google App Engine application that would store messages submitted via a HTML textbox and provide a way of querying these messages.
2) An arduino sketch that would make requests of the web app and display the results on an LCD screen. Here's the result:
http://mattywpager.appspot.com/
The hardest part was working out how an arduino can query this app using the shared ip address of appspot.com. This was acheived by using wireshark to see what my browser was doing. The resulting sketch simply sends this to the client
client.println("GET /last HTTP/1.1"); client.println("HOST: myappname.appspot.com"); client.println("Connection: keep-alive"); client.println("Cache-Control: max-age=0"); client.println("Accept-Language:en-us,en;q=0.5"); client.println("Accept-Encoding:gzip,deflate"); client.println();
The whole thing took about 4 hours. But was great fun.
Thank you for the arduino code but i have used wireshark and i will not see the cache-control line. Why did you add it ?
ReplyDeleteI'm using firefox and chromium to test.
cache-control isn't actually needed I don't think. It's Host: that's important
DeleteIt's a good application. I am studying arduino how to GET/POST data to google app engine. Could you share me your GAE application code? Or tell me arduino data how to match doGet() function at server side. Thanks!
ReplyDeleteI'm trying to do the same thing, but with a wifi sheild. The problem I'm encountering is that the code for my wifi shield requires an IP of the site I'm pulling from and it seems that appengine sites don't map directly to IPs (the IP goes to google instead of my site).
ReplyDeletePlease help by posting both your GAE and Arduino code.
cool!! im learning android & arduino data sharing through GAE. this blog is veery useful for me! Thank you!
ReplyDeletehow does app engine bit work?
ReplyDeleteI'm interested in linking to radio