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-01-11
Package Version: 1.0.0.0
mikroSDK Library: 1.0.0.0
Category: Current sensor
Downloaded: 3896 times
Not followed.
License: MIT license
The Hall Current 4 click is designed to measure relatively high current by using the integrated ACS70331 sensor.
Do you want to subscribe in order to receive notifications regarding "Hall Current 4 click" changes.
Do you want to unsubscribe in order to stop receiving notifications regarding "Hall Current 4 click" changes.
Do you want to report abuse regarding "Hall Current 4 click".
Library Description
This library provides basic functionality for reading the current value and controlling the click board.
Key functions:
float hallcurrent4_getCurrent()
- Reads current in mA.uint16_t hallcurrent4_readData()
- Reads current 12bit data.Examples description
The application is composed of the three sections :
void applicationTask()
{
char demoText[ 50 ];
float Current;
Current = hallcurrent4_getCurrent();
mikrobus_logWrite(" Current value: ", _LOG_TEXT);
FloatToStr(Current, demoText);
mikrobus_logWrite(demoText, _LOG_TEXT);
mikrobus_logWrite(" mA", _LOG_LINE);
mikrobus_logWrite(" ------------------------- ", _LOG_LINE );
Delay_ms( 1000 );
}
Other mikroE Libraries used in the example:
I2C
UART
Additional notes and information
Depending on the development board you are using, you may need USB UART click, USB UART 2 clickor 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.