Two arduino boards communicating


Are two arduino boards able to communicate together across the internet using the wishield from asynclabs?

I have two arduino UNO boards with a wishield connected to each.What I want to do is to have a PIR and a LED on each board and have them in seperate locations connect to the internet via the wishield. When the PIR on board 1 detects movement the LED on board 2 will light for a minute and vise versa.

Is there any one who has done something like this before and would have some code to help me on my way as I am a newbie to arduino?

Thanks in advance for your help


As long as you can reach one from the other across the internet then there's nothing stopping them from communicating. You'll need externally visible IP addresses for each though, and whilst do-able, is not the norm. Typically a device will be NAT'd behind a firewall.

One way around might be to consider using something like Twitter as a message transport. One device posts updates to Twitter and the other looks for updated posts. I played with this as an experiment a couple of months back, based on a post here from memory, but with a Python app doing the checking and using basic serial comms to communicate changes to the attached device.

Of course Twitter is possibly overkill, but does take away some of the pain points. Other options might be via website you build that provides a messaging relay function - ie it accept POSTs from one end, and makes data available to clients via standard HTTP GET, who would simply check the site every minute or whatever granularity you need. You'd need to build the intermediary though.

Hope that gives you some ideas.


Then there is the option of thinks like - -

This can redirect a request to fixed IP address, to the dynamic IP address of your router, which does port forwarding to your Arduino.

Pachube ?

Thanks guys for your responses :)

Other options might be via website you build that provides a messaging relay function

I was looking into doing this.What code would I use with the arduino to post to this specific website I create.I take it I will have to put the web address in the code some how and have some sort of of post function to post to this site? Or am I way off the mark?

See the problem I have at the minute is that the wishields are only connecting to a local network ap and I'm still waiting on the Technician here were I work to allow me access to the internet so I am not fit to get connected to sites like twitter or pachube yet.


The Wishield comes with sample code showing server and client examples. Suggest you get your head around them - you'll need that knowledge no matter what you end up doing.

You can start doing this on your local network - no need for intertubes at this early point! :)

I have code somewhere that posts to Pachube - it's pretty simple stuff, I'm sure there's some sample code here in the Playground etc as well if you poke around.