Wifly Working at Last!

After several attempts to get my Wifly-rn-xv working I’ve finally succeeded. The documentation seems good at first glance but when you get into it you realise information is missing. To be fair I got the initial connection working with a combination of the command datasheet and the following blog: http://www.tinkerfailure.com/2012/02/setting-up-the-wifly-rn-xv/

Thanks Tinker! Check out his other posts including using PHP to read the results. That’s exactly what I wanted to do. Take an analogue input voltage from a temperature sensor and record it using the web server. I struggled a lot though until I read the following posts on the sparkfun forum: https://forum.sparkfun.com/viewtopic.php?f=13&t=32719

It turns out there are some subtleties to all this, including an unseen resistor network before the reading is measured and least significant bits being stripped in the GET request. In the end, inspired by one of the posters I decided to use a multimeter and the measurement command and do my own linear regression. This actually worked out pretty well and the measurements are very accurate now.

So I had input voltages ranging from 0 to 1V in ~100mV increments and had the decimal value at the command line of 34,500 (0x08698 -> ~0x086A via HTTP GET) to 183,800 (0x2cf3e), supposedly in uVs. That gave me a slope and offset to play with. It turns out the readings were thankfully very linear.

I used the Sparkfun named pin ADC0, which is pin 20, but called SEN 2 at the wifly. At the command line, to read this input use the command: “show q 2”.

I hope this makes sense to someone else who is having a bit of a struggle!

One day I might try the UART data via HTTP option – but not until I can face it!


5 Responses to Wifly Working at Last!

  1. Chris says:

    Hi, glad you found the WiFly set-up info helpful.

    I’ve been having the same problems as you, so your link to the Sparkfun forums has been very useful for me too!

    Can I ask what sensors you have connected up?

    • dmt195 says:

      Thanks for commenting and thanks for your blog. I was using an Analogue Devices TMP37. It has a simple analogue output that’s proportional to temperature. It doesn’t do negative temps (Celsius) but there are others in the series that do (TMP36) if that’s important to you. My project was for indoors though and I figured I wouldn’t need it.

  2. Chris says:

    Yeah I have some TMP36’s. Mine are currently all indoor too, but I figured I might (might) want to put one outside at some point, so at least I could use the exact same sensor throughout.
    I finally got it figured out last night, so now I’m getting accurate readings at last!

  3. SanUSB Laese says:

    Sketch Arduino for Wifly RN-XV modem configuration without Wifly library and
    with front-end: https://dl.dropboxusercontent.com/u/101922388/WiflySanUSB.zip

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: