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: 2020-02-26
Package Version: 1.0.0.0
mikroSDK Library: 1.0.0.0
Category: Temperature & humidity
Downloaded: 2836 times
Not followed.
License: MIT license
SHT AN Click is a sensorics based add on board which can be used for measuring humidity and temperature. It features fully calibrated, linearized and temperature compensated SHT31-ARP-B sensor with analog output. This sensor is built on a new technology CMOSens sensor chip from Sensirion.
Do you want to subscribe in order to receive notifications regarding "SHT AN click" changes.
Do you want to unsubscribe in order to stop receiving notifications regarding "SHT AN click" changes.
Do you want to report abuse regarding "SHT AN click".
Library Description
The library covers all the necessary functions to control SHT AN Click board.
Key functions :
void shtan_set_mode ( uint8_t adc_mode )
- Set ADC mode function.void shtan_reset ( void )
- Hardware reset function.Examples description
The application is composed of three sections :
void application_task ( )
{
shtan_calculate_temperature( );
mikrobus_logWrite( " Temp. : ", _LOG_TEXT );
display_log( temperature );
mikrobus_logWrite( degCel, _LOG_LINE );
shtan_calculate_humidity( );
mikrobus_logWrite( " Hum. : ", _LOG_TEXT );
display_log( humidity );
mikrobus_logWrite( " %", _LOG_LINE );
mikrobus_logWrite( "------------------", _LOG_LINE );
Delay_ms( 1000 );
}
void shtan_calculate_temperature ( void )
- Calculate temperaturevoid shtan_calculate_humidity ( void )
- Calculate humidityvoid display_log ( float value )
- Displays readings as floating point value with two decimal placesOther 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.