moisture 2.0.0.0
|
Moisture click is a Click boardâ„¢ that can be used to easily detect a moisture level of the skin, by simply touching the sensitive surface of the PCB.
We provide a library for the Moisture Click as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.
Package can be downloaded/installed directly form compilers IDE(recommended way), or downloaded from our LibStock, or found on mikroE github account.
This library contains API for Moisture Click driver.
- Initialization function.void moisture_cfg_setup ( moisture_cfg_t *cfg );
MOISTURE_RETVAL moisture_init ( moisture_t *ctx, moisture_cfg_t *cfg );
void moisture_default_cfg ( moisture_t *ctx );
- Configure device functionuint8_t moisture_get_data ( moisture_t *ctx );
void moisture_cfg( moisture_t *ctx, uint16_t gain, uint16_t offset, uint16_t clk_div );
void moisture_soft_reset ( moisture_t *ctx );
The demo application displays relative moisture measurement using Moisture click.
The demo application is composed of two sections :
Initializes Driver and sets moisture gain, offset data and clock divider and performs calibration of the device. We advise you not to touch, or expose sensor to moisture during the calibration.
The device measure moisture and displays data in percentage every 500ms.
The full application code, and ready to use projects can be installed directly form compilers IDE(recommneded) or found on LibStock page or mikroE GitHub accaunt.
Other mikroE Libraries used in the example:
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.