![Roving Networks RN-171 Скачать руководство пользователя страница 57](http://html1.mh-extra.com/html/roving-networks/rn-171/rn-171_user-manual-and-command-reference_1492508057.webp)
WiFly GSX
www.rovingnetworks.com
WiFlyRN171-um 2/23/2011
809 University Avenue
•
Los Gatos, CA 95032
•
Tel (408) 395-6539
~
57
~
16.1.
Automatic sampling of sensor pins:
The sensor pins can be automatically sampled and data forwarded in 2 modes:
1.
the UDP broadcast packet will contain the value of the samples.
2.
in HTTP mode, the pin sampled data can be forwarded to a remote server
to enable the above modes, use the
setq sensor<mask>
command.
For example, to sample all sensors inputs, use the
set q sensor 0xff
command.
16.2.
Using the Built In Sensor Power
WiFly modules contain an onboard Sensor power pin, which is controlled by the command below:
set q sensor <mask>
Bitmask value that determines which sensor pins to sample when sending
data using the UDP broadcast packet, or the HTTP auto sample function.
NOTE
: The sensor pins variable has been changed from
“set option sensor <mask>” to set q sensor <mask> in ver 2.21.1
set q power <value>
This is a new register added in ver 2.21.1 to automatically turn on the
sensor power. This is a 8 bit register with two 4 bit nibbles. If the top
nibble is set, then power is applied upon power up and removed upon
power down or sleep.
If the bottom nibble is set, then power is applied when a sampling event
occurs, for example:
•
The UDP Broadcast
•
The auto web posting of sensor data
The power is removed immediately after the sampling is complete.
The values used for setting the power are described in the table below:
Value
Sensor pin voltage
0
Turn off the sensor power
1
GROUND the sensor pin
2
1.2V internal regulated reference
3
VBATT input pin