Home Automation and Networked Objects
Topic: XMLHttpRequest iface
(Read 84 times)
Apr 23, 2015, 02:03 am
A way to add arduino control to any web page. (needs IP shield ;-)
Make your web page. Open it as a local file. And if there's an arduino on your LAN it will respond to clicks on any object you chose on this page.
for example: any element in an html list item which *didn't* have a message attached might be:
<li>This sends nothing</li>
to attach a message to arduino all we need do is mod this html to:
<li class="btn" id = "46">This sends the message when clicked to arduino: btn46</li>
it's easy to then respond to this in arduino
(it turns up as "GET /btn46" in arduino)
It uses jscript XMLHttpRequest method (using a script which needs no editing whatever your app.) which can also be stored locally or indeed anywhere u have a web server account.
Caveat: It's one-way only; can't get msgs back to browser. But then if i want to open the curtains i can see if they are openning, and anyway this only works when you are on your LAN. And my TV handset doesn't give me any fb but it's still useful! So maybe home integration app..?
it's super light on arduino real estate - about 10 lines of code... and you can make whatever swanky web page you like and attach this functionality.