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 (0×08698 -> ~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!