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: 2018-10-15
Package Version: 1.0.0.0
mikroSDK Library: 1.0.0.0
Category: Pressure
Downloaded: 4287 times
Not followed.
License: MIT license
Vacuum click is an accurate pressure-sensor click board that is capable of measuring pressure values down to -115kPa. This click boardâ„¢ utilizes a very precise and low thermal drift, absolute pressure-sensor from NXP, labeled as MPXV6115V.
Do you want to subscribe in order to receive notifications regarding "Vacuum click" changes.
Do you want to unsubscribe in order to stop receiving notifications regarding "Vacuum click" changes.
Do you want to report abuse regarding "Vacuum click".
Library Description
The library initializes and defines the I2C bus driver.
The library includes the function for reading ADC data and the function for converting ADC value to the percentage of Vacuum and pressure in mBar.
The user also has the function for sensor calibration.
Key functions :
void vacuum_calibration()
- Sensor calibrationuint16_t vacuum_readData()
- The function for reads 12 bit ADC datafloat vacuum_getVoltage()
- The function for converting ADC value to pressure datafloat vacuum_getPercentageOfVacuum()
- The function for converting ADC value to percentage of VacuumExample description
The application is composed of three sections :
void applicationTask()
{
mikrobus_logWrite("Vacuum (voltage) : ", _LOG_TEXT);
Vacuum_volt = vacuum_getVoltage();
FloatToStr(Vacuum_volt, demoText);
mikrobus_logWrite(demoText, _LOG_TEXT);
mikrobus_logWrite(" V", _LOG_LINE);
mikrobus_logWrite("Percentage of vacuum: ", _LOG_TEXT);
Vacuum = vacuum_getPercentageOfVacuum();
FloatToStr(Vacuum, demoText);
mikrobus_logWrite(demoText, _LOG_LINE);
mikrobus_logWrite(" ", _LOG_LINE);
Delay_ms(300);
}
Other mikroE Libraries used in the example:
Additional notes and information
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.