Digital sensors
Digital sensors are devices that are capable of setting a GPIO input status in two possible states, on or off, according to the state of the measured entity. Then, these two states have to be converted into the corresponding logic 1 and 0 statuses with a proper circuitry.
Water sensor
A water sensor is a device capable of detecting the water presence near the circuitry by exploiting the water conductivity. In the following image, you can see one of the devices:
Note
The device can be purchased at http://www.cosino.it/product/water-sensor or by surfing the Internet.
This is a really simple device that implements the circuitry in the following diagram, where the resistor (R) has been added to limit the current when the water closes the circuit:
When a single drop of water touches two or more teeth of the comb in the schematic, the circuit is closed and the output voltage (Vout) drops from Vcc (logic 1) to a value near 0V (logic 0).
To test this device with our SAMA5D3 Xplained...