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-04
Package Version: 1.0.0.1
mikroSDK Library: 1.0.0.0
Category: Motion
Downloaded: 5393 times
Followed by: 11 users
License: MIT license
10DOF click board carries two modules from Bosch: BNO055, a 9-axis absolute orientation sensor and BMP180, a digital pressure sensor. 10DOF click communicates with the target board MCU through the mikroBUS I2C interface (SCL, SDA), with additional functionality provided by INT and RST pins. Designed to use a 3.3V power supply only.
Do you want to subscribe in order to receive notifications regarding "10DOF click" changes.
Do you want to unsubscribe in order to stop receiving notifications regarding "10DOF click" changes.
Do you want to report abuse regarding "10DOF click".
Library Description
The library covers all the necessary functions to control 10DOF Click board. Library performs the communication with the device via I2C driver by writing to registers and by reading from registers of BMP180 and BNO055 chip sensor. The library has generic write and reads function for both chips, get measurements function, get the temperature and pressure data from the register, a function for reading calibration, for sets configuration and all the necessary functions to control and read X-axis, Y-axis & Z axis data of accel, gyro and magnetometer coordinates. Function who gets temperature, humidity and pressure also read factory calibration and converts temperature data to degree Celsius [ °C ] and pressure value to mbar.
Key functions:
Examples description
The application is composed of three sections:
void applicationTask() { c10dof_readAccel( &accelX, &accelY, &accelZ ); delay_ms( 10 ); c10dof_readGyro( &gyroX, &gyroY, &gyroZ ); delay_ms( 10 ); c10dof_readMag( &magX, &magY, &magZ ); delay_ms( 10 ); temperature = c10dof_getTemperature(); delay_ms( 10 ); c10dof_getMeasurements( &temperature, &pressure ); delay_ms( 10 ); mikrobus_logWrite( " Accel X :", _LOG_TEXT ); IntToStr( accelX, logText ); mikrobus_logWrite( logText, _LOG_TEXT ); mikrobus_logWrite( " | ", _LOG_TEXT ); mikrobus_logWrite( " Gyro X :", _LOG_TEXT ); IntToStr( gyroX, logText ); mikrobus_logWrite( logText, _LOG_TEXT ); mikrobus_logWrite( " | ", _LOG_TEXT ); mikrobus_logWrite( " Mag X :", _LOG_TEXT ); IntToStr( magX, logText ); mikrobus_logWrite( logText, _LOG_TEXT ); mikrobus_logWrite( " | ", _LOG_TEXT ); mikrobus_logWrite( "Temp. : ", _LOG_TEXT ); FloatToStr( temperature, logText ); mikrobus_logWrite( logText, _LOG_TEXT ); mikrobus_logWrite( degCel, _LOG_LINE ); mikrobus_logWrite( " Accel Y :", _LOG_TEXT ); IntToStr( accelY, logText ); mikrobus_logWrite( logText, _LOG_TEXT ); mikrobus_logWrite( " | ", _LOG_TEXT ); mikrobus_logWrite( " Gyro Y :", _LOG_TEXT ); IntToStr( gyroY, logText ); mikrobus_logWrite( logText, _LOG_TEXT ); mikrobus_logWrite( " | ", _LOG_TEXT ); mikrobus_logWrite( " Mag Y :", _LOG_TEXT ); IntToStr( magY, logText ); mikrobus_logWrite( logText, _LOG_TEXT ); mikrobus_logWrite( " | ", _LOG_LINE ); mikrobus_logWrite( " Accel Z :", _LOG_TEXT ); IntToStr( accelZ, logText ); mikrobus_logWrite( logText, _LOG_TEXT ); mikrobus_logWrite( " | ", _LOG_TEXT ); mikrobus_logWrite( " Gyro Z :", _LOG_TEXT ); IntToStr( gyroZ, logText ); mikrobus_logWrite( logText, _LOG_TEXT ); mikrobus_logWrite( " | ", _LOG_TEXT ); mikrobus_logWrite( " Mag Z :", _LOG_TEXT ); IntToStr( magZ, logText ); mikrobus_logWrite( logText, _LOG_TEXT ); mikrobus_logWrite( " |", _LOG_TEXT ); mikrobus_logWrite( " Press.: ", _LOG_TEXT ); FloatToStr( pressure, logText ); mikrobus_logWrite( logText, _LOG_TEXT ); mikrobus_logWrite( " mbar", _LOG_LINE ); delay_ms( 3000 ); }
Other mikroE Libraries used in the example:
I2C
UART​
Conversion
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