-114-
v7.2
Sensors probes
4.18.2. Measurement process
The luminosity sensor provides a digital signal using the I2C protocol.
Reading code:
{
// 1. Declare an object for the sensor
luxes mySensor(XTR_SOCKET_A);
// 2. Turn ON the sensor
mySensor.ON();
// 3. Read the sensor. Store parameters in local variables
uint32_t luminosity = mySensor.getLuminosity();
// 4. Turn off the sensor
mySensor.OFF();
}
You can find a complete example code for reading this sensor probe in the following link:
http://www.libelium.com/
development/waspmote/examples/ag-xtr-17-TSL2561-sensor-reading/
4.18.3. Socket
Connect the Luminosity sensor probe to the Plug & Sense! Smart Agriculture Xtreme in any of the sockets shown
in the image below.
Figure: Available sockets for the Luminosity sensor probe
4.18.4. Application examples
•
Light presence detection for artificial lightning usage