User`s guide

RN-WIFLYCR-UG
www.rovingnetworks.com Version 1.2r 4/30/13 page 92
With firmware version 2.22 and higher, the module can scan for networks while in ad
hoc mode. Issuing the scan command temporarily disables ad hoc model while the
module is scanning. Ad hoc mode is restored automatically when the scan completes.
If you are connected to the module over telnet, the scan result is sent over telnet and
ad hoc mode is restored.
4.9 ANALOG SENSOR CAPABILITY
The module has 8 analog sensor inputs that can be driven between 0 to 1.2-V DC. You
can sample the analog inputs and read digital value using the show q <value> com-
mand, where <value> is a decimal number representing the channel. See “show q
<value>” on page 38 for more details.
The channel is the analog sensor input from 0 to 7. The value for the analog sensor
input is measured in microvolts and is returned as 8xxxxx, where the beginning 8 is a
start marker.
You can also sample multiple channels by using a bit mask using the show q 0x1
<mask> command, where <mask> is a bit mask of the channels. See “show q
0x1<mask>” on page 38 for more details.
EXAMPLE 4-19: READ CHANNELS 0, 1 & 7
The results are in the format 8<channel 0>, 8<channel 1>, 8<channel 7>\r\n
The analog input hardware specification is:
Input voltage range:0 - 1.2 V, however, the analog-to-digital converter saturates at
400 mV
Resolution: 14 bits = 12 uV
Sampling frequency: 35 us
Accuracy: 5% un-calibrated
The accuracy of each analog sensor reading can be offset by up to 5% due to variations
from chip to chip. To improve accuracy, Roving Networks recommends using a preci-
sion reference voltage on one of the analog inputs to calculate the offset. The offset is
the same for all analog inputs. For example:
Drive precision 200 mV reference on analog input 4.
Read analog input 4 and compute the offset.
If you read 210 mV you know that the offset is +10 mV. When you read input 5, subtract
10 mV from the result.
4.9.1 Sampling Sensor Pins Automatically
The sensor pins can be sampled automatically and data forwarded in two modes:
The UDP broadcast packet can contain the sample values.
In HTTP mode, the sampled pin data can be forwarded to a remote server
WARNING
Driving these inputs above 1.2 V can permanently damage the module.
show q 0x183 // Read channels 0, 1, and 7