Great method for easy communication to a browser

Hi all,

I just wrote a blog post about an easy way to communicate from an Arduino directly into an online webpage, without using Flash or Java, just over an ethernet cable. I thought I'd share this here.

Similar things have been done before (the idea started from the simple Arduino Server example), but it seems that most people still think that we need to read from the serial post to get data into the computer.

This technique is great because it allows you to develop rich applications using just JavaScript. All the real code on that page, like the graphs, is just scripting without ever needing to modify the Arduino's sketch.

Well done (although not working now I got the idea)

Did you try it and it didn't work for you? I've tried it on a couple different browsers and different Arduinos, and the process of sending data to the browser has always been a snap. Really a 2-minute set-up from start to finish. And it works on any computers, such as a school lab computer: no need to install drivers or anything.

You can try out the stand-alone example as well: Arduino Ethernet Values (stand-alone) - JSFiddle - Code Playground

I think with some further expansion on that demo (reporting info from the digital pins, for instance), it would make a great workbench for experimenting with the Arduino.

Did you try it and it didn't work for you?

I did try your website and it was not working, (that was where I refered to), FYI I used FireFox 11.0 on Win7/64 SP1

Hello!

This sounds great! I know that it works with the arduinos with the ethernet availability, but I have the arduino nano which only have the micro-usb connection. Is there a way that this arduino could do this? :\

Thank you!

If you wanted to you use this same technique, the easiest thing to do would probably to get an ethernet shield for the Arduino Nano, like this one: http://www.robotshop.com/arduino-nano-ethernet-board-microsd.html

If you just want to use the USB output, that probably requires Java or Flash or something -- that's what we are avoiding by using the ethernet.

I have a created a small library for making this work even easier: GitHub - sfentress/ArduinoEthernetCom: Simple communication between an Arduino and the browser using an Ethernet connection

Now you can create basic examples of getting data from an Arduino with about 10 lines of JavaScript. You can look at the source of the example page at http://sfentress.github.com/ArduinoEthernetCom/example.html