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-11-21
Package Version: 1.0.0.0
mikroSDK Library: 1.0.0.0
Category: Motion
Downloaded: 4200 times
Not followed.
License: MIT license
Accel 7 click is a three-axis acceleration sensing Click board™. It uses the KXTJ3-1057, a 14bit tri-axis digital accelerometer, which can sense the acceleration up to ±16 g. This sensor is built using the proprietary Kionix micromachining technology, which results with a high accuracy and very good noise immunity.
Do you want to subscribe in order to receive notifications regarding "Accel 7 click" changes.
Do you want to unsubscribe in order to stop receiving notifications regarding "Accel 7 click" changes.
Do you want to report abuse regarding "Accel 7 click".
Library Description
The library initializes and defines the I2C bus driver and drivers that offer a choice for writing data in register. The library includes function for read X/Y/Z axis data. The user also has the function for initializes chip and function for read interrupt state.
Key functions:
int16_t accel7_getAxis(uint8_t _axis)
- Functions for read axis datauint8_t accel7_init(uint8_t dataRes, uint8_t range)
- Functions for initialize the chipExamples description
The application is composed of the three sections :
void applicationTask()
{
X_axis = accel7_getAxis(_ACCEL7_AXIS_X);
IntToStr(X_axis, demoText);
mikrobus_logWrite("X axis: ", _LOG_TEXT);
mikrobus_logWrite(demoText, _LOG_LINE);
Y_axis = accel7_getAxis(_ACCEL7_AXIS_Y);
IntToStr(Y_axis, demoText);
mikrobus_logWrite("Y axis: ", _LOG_TEXT);
mikrobus_logWrite(demoText, _LOG_LINE);
Z_axis = accel7_getAxis(_ACCEL7_AXIS_Z);
IntToStr(Z_axis, demoText);
mikrobus_logWrite("Z axis: ", _LOG_TEXT);
mikrobus_logWrite(demoText, _LOG_LINE);
mikrobus_logWrite(" ", _LOG_LINE);
Delay_ms( 1000 );
}
Other mikroE Libraries used in the example:
SPI
UART
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.