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: 2019-10-31
Package Version: 1.0.0.0
mikroSDK Library: 1.0.0.0
Category: Current sensor
Downloaded: 3365 times
Not followed.
License: MIT license
The AMR Current Click is a Click board which features the MCR1101-20-5, an AMR based integrated current sensor from ACEINNA.
Do you want to subscribe in order to receive notifications regarding "AMR Current click" changes.
Do you want to unsubscribe in order to stop receiving notifications regarding "AMR Current click" changes.
Do you want to report abuse regarding "AMR Current click".
Library Description
Library provides functions for reading ADC value, and function for reading converted ADC data to mA
Key functions:
uint16_t amrcurrent_read_value ( void )
- .Reads ADC current datafloat amrcurrent_get_current ( void )
- .Reads current data in mAExamples description
The application is composed of three sections :
void application_task ( )
{
read_adc_val = amrcurrent_read_value( );
WordToStr( read_adc_val, demo_txt );
mikrobus_logWrite( " - ADC value: ", _LOG_TEXT );
mikrobus_logWrite( demo_txt, _LOG_LINE );
Delay_ms( 100 );
read_curr_val = amrcurrent_get_current( );
FloatToStr( read_curr_val, demo_txt );
mikrobus_logWrite( " - Current value: ", _LOG_TEXT );
mikrobus_logWrite( demo_txt, _LOG_TEXT );
mikrobus_logWrite( "mA", _LOG_LINE );
Delay_ms( 100 );
mikrobus_logWrite( "-------------------------", _LOG_LINE );
Delay_ms( 5000 );
}
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.