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-03-16
Package Version: 1.0.0.0
mikroSDK Library: 1.0.0.0
Category: Current sensor
Downloaded: 2660 times
Not followed.
License: MIT license
The VCP Monitor Click is add-on board power monitor system. This Click board is based on INA260AIPWR - precision digital current and power monitor with low-drift, integrated precision shunt resistor, from Texas Instruments.
Do you want to subscribe in order to receive notifications regarding "VCP Monitor click" changes.
Do you want to unsubscribe in order to stop receiving notifications regarding "VCP Monitor click" changes.
Do you want to report abuse regarding "VCP Monitor click".
Library Description
The library contains basic communication with the module and allows the user to read and write data to the module. The user can read the current data of current, voltage and power measured by the sensor.
Key functions:
float vcpmonitor_get_voltage ( void )
- Reads voltage data in mVfloat vcpmonitor_get_current ( void )
- Reads current data in mAfloat vcpmonitor_get_power ( void )
- Reads power data in mWExamples description
The application is composed of three sections :
void application_task ( )
{
float current_data;
float voltage_data;
float power_data;
current_data = vcpmonitor_get_current( );
IntToStr( current_data, demo_text );
mikrobus_logWrite( ">> Current data: ", _LOG_TEXT );
mikrobus_logWrite( demo_text, _LOG_TEXT );
mikrobus_logWrite( " mA", _LOG_LINE );
voltage_data = vcpmonitor_get_voltage( );
IntToStr( voltage_data, demo_text );
mikrobus_logWrite( ">> Voltage data: ", _LOG_TEXT );
mikrobus_logWrite( demo_text, _LOG_TEXT );
mikrobus_logWrite( " mV", _LOG_LINE );
power_data = vcpmonitor_get_power( );
IntToStr( power_data, demo_text );
mikrobus_logWrite( ">> Power data: ", _LOG_TEXT );
mikrobus_logWrite( demo_text, _LOG_TEXT );
mikrobus_logWrite( " mW", _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.