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-07
Package Version: 1.0.0.0
mikroSDK Library: 1.0.0.0
Category: Motion
Downloaded: 3166 times
Not followed.
License: MIT license
13DOF Click is an advanced 13-axis motion tracking Click board, which utilizes three different sensor ICs onboard: BME680, a digital gas, humidity, pressure and temperature sensor and BMM150, a geomagnetic sensor and a BMI088, small, versatile 6DoF sensor module.
Do you want to subscribe in order to receive notifications regarding "13DOF click" changes.
Do you want to unsubscribe in order to stop receiving notifications regarding "13DOF click" changes.
Do you want to report abuse regarding "13DOF click".
Library Description
The library covers all the necessary functions to control 13DOF click board. Library performs a standard I2C interface communication.
Key functions:
float c13dof_bme680_getAmbientData( uint8_t dataIn )
- Get BME680 ambient data function.void c13dof_bmm150_readGeoMagData( int16_t *magX, int16_t *magY, int16_t *magZ, uint16_t *resHall )
- Get BMM150 Geomagnetic sensors data function.void c13dof_bmi088_readAccel( int16_t *accelX, int16_t *accelY, int16_t *accelZ )
- Read Accel X-axis, Y-axis and Z-axis function.Examples description
The application is composed of three sections :
void applicationTask()
{
temperature = c13dof_bme680_getTemperature();
Delay_10ms();
mikrobus_logWrite( " | BME680 |", _LOG_LINE );
mikrobus_logWrite( "----------------------------------------------------------", _LOG_LINE );
mikrobus_logWrite( " ", _LOG_TEXT );
mikrobus_logWrite( " Temperature : ", _LOG_TEXT );
FloatToStr( temperature, logText );
mikrobus_logWrite( logText, _LOG_TEXT );
mikrobus_logWrite( degCel, _LOG_LINE );
humidity = c13dof_bme680_getHumidity();
Delay_10ms();
mikrobus_logWrite( " ", _LOG_TEXT );
mikrobus_logWrite( " Humidity : ", _LOG_TEXT );
FloatToStr( humidity, logText );
mikrobus_logWrite( logText, _LOG_TEXT );
mikrobus_logWrite( " %", _LOG_LINE );
pressure = c13dof_bme680_getPressure();
Delay_10ms();
mikrobus_logWrite( " ", _LOG_TEXT );
mikrobus_logWrite( " Pressure : ", _LOG_TEXT );
FloatToStr( pressure, logText );
mikrobus_logWrite( logText, _LOG_TEXT );
mikrobus_logWrite( " mbar", _LOG_LINE );
gasRes = c13dof_bme680_getGasResistance();
Delay_10ms();
mikrobus_logWrite( " ", _LOG_TEXT );
mikrobus_logWrite( " Gas Resistance : ", _LOG_TEXT );
LongWordToStr( gasRes, logText );
ltrim( logText );
mikrobus_logWrite( logText, _LOG_LINE );
mikrobus_logWrite( "----------------------------------------------------------", _LOG_LINE );
readyCheck = c13dof_bmm150_checkReady();
while ( readyCheck != _C13DOF_BMM150_DATA_READY )
{
readyCheck = c13dof_bmm150_checkReady();
}
c13dof_bmi088_readAccel( &accelX, &accelY, &accelZ );
Delay_10ms();
c13dof_bmi088_readGyro( &gyroX, &gyroY, &gyroZ );
Delay_10ms();
c13dof_bmm150_readGeoMagData( &magX, &magY, &magZ, &RHall );
Delay_10ms();
mikrobus_logWrite( " BMI088 | BMM150", _LOG_LINE );
mikrobus_logWrite( "----------------------------------------------------------", _LOG_LINE );
mikrobus_logWrite( "| Accel | Gyro | Mag |",_LOG_LINE );
mikrobus_logWrite( "----------------------------------------------------------", _LOG_LINE );
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_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_LINE );
mikrobus_logWrite( "----------------------------------------------------------", _LOG_LINE );
mikrobus_logWrite( "----------------------------------------------------------", _LOG_LINE );
Delay_1sec();
Delay_1sec();
}
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.