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-06-15
Package Version: 1.0.0.0
mikroSDK Library: 1.0.0.0
Category: Pressure
Downloaded: 2234 times
Not followed.
License: MIT license
Pressure 10 Click features a digital interface barometric pressure sensor, labeled as HSPPAD042A. Barometric pressure is detected by the MEMS sensor that is placed on this Click boardâ„¢ using the piezoresistive bridge circuit formed on the silicon diaphragm.
Do you want to subscribe in order to receive notifications regarding "Pressure 10 click" changes.
Do you want to unsubscribe in order to stop receiving notifications regarding "Pressure 10 click" changes.
Do you want to report abuse regarding "Pressure 10 click".
Library Description
The library contains basic functions for reading temperature and pressure. The user has the ability to set the configuration of the measurement module.
Key functions:
float pressure10_get_temperature ( void )
- Get Temperature data in Cfloat pressure10_get_pressure ( void )
- Get Pressure data in %RHvoid pressure10_control_cfg ( uint8_t ctrl_reg, uint8_t wr_data )
- Set the configuration in the control registersExamples description
The application is composed of three sections :
void application_task( )
{
float temperature;
float pressure;
char demo_text[ 20 ];
pressure = pressure10_get_pressure( );
temperature = pressure10_get_temperature( );
FloatToStr( temperature, demo_text );
mikrobus_logwrite( ">> Temperature: ", _LOG_TEXT );
mikrobus_logwrite( demo_text, _LOG_TEXT );
mikrobus_logWrite( " C", _LOG_LINE );
FloatToStr( pressure, demo_text );
mikrobus_logwrite( ">> Pressure: ", _LOG_TEXT );
mikrobus_logwrite( demo_text, _LOG_TEXT );
mikrobus_logWrite( " %RH", _LOG_LINE );
mikrobus_logwrite( "-----------------------", _LOG_LINE );
Delay_ms( 1500 );
}
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.