Board configuration and programming
Last updated
Last updated
The Plug & Sense! Smart Water Xtreme model does not require special handling of the hardware by the user, except for placing the sensors in their corresponding socket. In the previous sections each sensor connection has been described.
It is important to remark that Smart Water Xtreme model is only available in the Waspmote Plug & Sense! Line. It is not available for Waspmote OEM line.
When using the Plug & Sense! Smart Water Xtreme model, remember that it is mandatory to include the WaspSensorXtr
library by introducing the next line at the beginning:
#include <WaspSensorXtr.h>
The library manages the power supply and communication lines between Waspmote and the sockets. Prior to read the sensor probes, the user must declare an object of the corresponding sensor class, specifying the socket where the sensor is placed. The next table enumerates each sensor class.
Each sensor class manages the Smart Water Xtreme sensor board according to its needs, so there is no need to turn on or off the whole board, as is often needed with other Libelium sensor boards. After declaring the object, the sensor can be turned on or off independently from each other. Incidentally, do not forget turning off the sensors to save battery when they are no longer needed.
The next snippet shows how to declare an object for the sensor PHEHT and then how to turn on, read and turn off the sensor:
The read()
function stores the sensor values in a public object. It does not return the values directly. The user can refer to the dedicated sensor example to see how the sensor values can be accessed. In the case of the PHEHT sensor, values will be printed by USB with the following snippet.
The Temperature, humidity and pressure, the Ultrasound and the Luminosity sensors have their own reading functions in contrast to the rest of the Smart Water Xtreme sensors. This is due to these sensors can be used in other Plug & Sense! models and they share the same functions into the Waspmote API. Refer to the dedicated sensor example for further details.
Owing to the large amount of parameters that can be read by the Plug & Sense! Smart Water Xtreme model, a special frame type must be used with the Frame class in order to send the values correctly.
A complete example code for using the frame class can be found in the following link:
https://development.libelium.com/waspmote/sw-xtr-04-frame-class-utility
Refer to the Data Frame Guide for more information:
https://development.libelium.com/waspmote/data_frame_guide.pdf
Sensor probe
Sensor class
Optical dissolved oxygen and temperature OPTOD
Aqualabo_OPTOD
pH, ORP and temperature PHEHT
Aqualabo_PHEHT
Conductivity, salinity and temperature C4E
Aqualabo_C4E
Turbidity and temperature NTU
Aqualabo_NTU
Inductive conductivity, salinity and temperature CTZN
Aqualabo_CTZN
Suspended solids, turbidity, sludge blanket and temperature MES5
Aqualabo_MES5
Manta
Eureka_Manta
Radar level VEGAPULS C21 sensor
VegaPuls_C21