We strongly encourage users to use Package manager for sharing their code on Libstock website, because it boosts your efficiency and leaves the end user with no room for error. [more info]
Rating:
Author: MIKROE
Last Updated: 2019-03-19
Package Version: 1.0.0.1
mikroSDK Library: 1.0.0.0
Category: Miscellaneous
Downloaded: 7363 times
Not followed.
License: MIT license
Water Detect click is used for detecting water and other electroconductive liquids. All you need to do is splash or soak the upper part of the click board, and the output of Microchip's MCP606 compactor will go positive, signaling the presence of liquid.
Do you want to subscribe in order to receive notifications regarding "WaterDetect click" changes.
Do you want to unsubscribe in order to stop receiving notifications regarding "WaterDetect click" changes.
Do you want to report abuse regarding "WaterDetect click".
Library Description
The library covers all the necessary functions to control Solar Water Detect Click board. Library performs the communication with the device via GPIO - INT pin. The library read the status of the water detection.
Key functions:
Examples description
The application is composed of three sections:
void applicationTask() { wdState = waterdetect_getStatus(); if ( wdState > wdStateOld ) { mikrobus_logWrite( " > Water is detected < ", _LOG_LINE ); mikrobus_logWrite( "-------------------------", _LOG_LINE ); wdStateOld = 1; } if ( wdState < wdStateOld ) { mikrobus_logWrite( " There is no water ", _LOG_LINE ); mikrobus_logWrite( "-------------------------", _LOG_LINE ); wdStateOld = 0; } }
Other mikroE Libraries used in the example:
GPIO
UART​
Additional notes and informations
Depending on the development board you are using, you may need USB UART click, USB UART 2 click or RS232 click to connect to your PC, for development systems with no UART to USB interface available on the board. The terminal available in all MikroElektronika compilers, or any other terminal application of your choice, can be used to read the message