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-04-23
Package Version: 1.0.0.0
mikroSDK Library: 1.0.0.0
Category: Motion
Downloaded: 3435 times
Not followed.
License: MIT license
SmartDOF click features a highly advanced integrated system-in-package (SiP) solution with three different sensors on-chip: triaxial accelerometer, magnetometer, and triaxial gyroscope are all integrated on a same die, along with the powerful 32-bit ARM® Cortex®-M0+ MCU.
Do you want to subscribe in order to receive notifications regarding "Smart DOF click" changes.
Do you want to unsubscribe in order to stop receiving notifications regarding "Smart DOF click" changes.
Do you want to report abuse regarding "Smart DOF click".
Library Description
Library contains functions for setting and getting pin states as well as function for device reset Library contains functions for i2c reading and writing data Library contains functions for sending and receiving packets (packet is data to send + 4 byte header) Library contains functions for requesting reports and receiving reports Library contains function for basic device initialization Library contains constants for boot modes, sensor Q points, channels, commands, sub-commands, report IDs and FRS report IDs.
Key functions:
void smartdof_sendPacket( uint8_t channel_number, uint16_t data_length, uint8_t * packet_data )
- forms a packet of data by attaching proper header to data.uint8_t smartdof_receivePacket( uint32_t n_cycles_timeout )
- receives data packet from device.void smartdof_getData( uint8_t * data_header, uint16_t * data_length, uint8_t * data_buffer )
- returns data received by 'smartdof_receivePacket()' function to user.Examples description
The application is composed of the three sections :
void applicationTask( )
{
smartdof_magnetometer_task( );
}
Additional Functions :
Other mikroE Libraries used in the example:
I2C
UART
Conversions
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.