Go Down

Topic: Arduino UNO + Seeed Relay Shield + RN-XV (Read 6902 times) previous topic - next topic


Jul 07, 2012, 01:02 am Last Edit: Jul 07, 2012, 01:15 am by vincenzo_suraci Reason: 1
Dear all,
this is to post my experience on the following configuration:
- Arduino UNO (http://arduino.cc/en/Main/ArduinoBoardUno/)
- Seeed Relay Shield (http://seeedstudio.com/wiki/Relay_Shield)
- Sparkfun WiFly RN-XV (http://www.sparkfun.com/products/10822)

The idea is to control the 4 relays using a simple web (http get) protocol over the wifi.

I came into this problem some days ago and I did not find any suitable and ready-to-use solution on the web. At the end I found a solution!

First of all I downloaded the most recent (AFAIK) libraries for the WiFly RN-XV (WiFlyHQ - https://github.com/harlequin-tech/WiFlyHQ/tree/). Then I wrote a newbie code to make the whole stuff work.

With the attached sketch (find below the link to download it), once you setup correctly the SSID and passphrase, you can point your browser to the IP_Address of your WiFly and do the following:

- http://IP_Address/?RELEX=ON (activate relay X, where X = 1,2,3,4, then shows the relays status)
- http://IP_Address/?RELEX=OFF (de-activate relay X, where X = 1,2,3,4, then shows the relays status)
- http://IP_Address/?RELEX=TOGGLE (activate relay X for 0,8 seconds, where X = 1,2,3,4, then shows the relays status)
- http://IP_Address/?ALL=ON (activate all the relays, then shows the relays status)
- http://IP_Address/?ALL=OFF (de-activate all the relays, then shows the relays status)

I hope this can help others to implement their wireless home building automation solution.
I also hope someone else can improve my dummy code to make it perform better or to provide more functionalities.

Best regards,
Vincenzo Suraci


bravo nice keep up my arduino friend  :)


Thank you very much for your sharing!!


Hi Vincenzo, very nice work!!
I'd like to propose our domotic framework to control your Arduino system.
We created a plugin for a similar relay board by ethermania.com.
I think you could simply adapt the code to your system.
Take a look at the documentation http://freedomotic.com/content/plugins/progettihw-sw-ethernet-board and http://code.google.com/p/freedomotic/wiki/ProgettiHwSwEthernetBoard
If you need any info please contact me.
Freedomotic Open IoT Framework
We need your help. Please contact us for contributing



I would love to read and attempt to improve you sample code but I can't seem to find it anywhere.  Do you mind providing it somewhere that I might get to it?


I found the software.  I guess I didn't look hard enough.  I can't seem to make it work.  I have exactly the setup described in the original post.  It seems to me that there is no connection between the Uno and the RN-XV. The Uno RX/TX pins don't connect to the RN-VX.  Also it looks like the GPIO pins on the RN-XV are not all connected to the relays (just relay 2&3).  I have a sparkfun Xbee Explorer that I used to setup the RN-XV.  I have no problem communicating with the RN-XV via wifi from my mac.  The breakdown appears to be between the Uno and the RN-XV.

Hopefully someone can straighten me out.


Dear John, sorry for the late reply. I have to admit I'm not an Arduino expert. So I cannot provide much help.
I had to struggle long with the configuration before finding a suitable solution to make the UNO communicate with the RN-XV.

Ensure that you plug-in the power adapter into the UNO board (and not into the Seeed board).

Best Regards,



The most help you could provide is a description of modifications you may have made to the Uno or the relay shield. Did you just plug the relay shield into the Uno and the RN-XV into the relay shield?  No additional jumpers or configuration changes?  If so I don't understand how the Uno communicates with the RN-XV.  The RX/TX pins are not connected.


Go Up