User manual

WiSnap User Manual 4.41 10202014-ML
Page 56
You can also sample multiple channels by using a bit mask: show q 0x1<mask> where mask is a bit mask of the channels.
For example, to read channels 0, 1, and 7, send the
show q 0x183 command.
The return values are the format: 8<chan0>, 8<chan1>, 8<chan7>\r\n
Automatic sampling of sensor pins:
The sensor pins can be automatically sampled and data forwarded in two 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 set q sensor <mask> command.
For example, to sample all sensors inputs, use the set q sensor 0xff command.
Using the Built-In Sensor Power
WiSnap modules contain an onboard Sensor power pin, which is controlled by the set q sensor <mask> command. <mask> is a
bit mask value that determines which sensor pins to sample when sending data using the UDP broadcast packet or the HTTP
auto-sample function.
NOTE: In versions of firmware prior to 2.23, this command is named set option sensor. Firmware versions 2.23 and higher
support the set q power <value> command. This command sets an 8-bit register with two 4 bit nibbles that automatically turns
on the sensor power.
ON BOARD TEMPERATURE OPTION (RN-121-TEMP ONLY)
show q t
The return values are the format: T=207\r\n - this would be 20.7° C.
show q t 1 - enables automatic sampling and output once per second.
show q t 0 - turns off automatic sampling and output of temperature.