TOP Contributors

  1. MIKROE (2779 codes)
  2. Alcides Ramos (376 codes)
  3. Shawon Shahryiar (307 codes)
  4. jm_palomino (118 codes)
  5. Bugz Bensce (97 codes)
  6. S P (73 codes)
  7. dany (71 codes)
  8. MikroBUS.NET Team (35 codes)
  9. NART SCHINACKOW (34 codes)
  10. Armstrong Subero (27 codes)

Most Downloaded

  1. Timer Calculator (139560 times)
  2. FAT32 Library (72041 times)
  3. Network Ethernet Library (57254 times)
  4. USB Device Library (47609 times)
  5. Network WiFi Library (43219 times)
  6. FT800 Library (42551 times)
  7. GSM click (29930 times)
  8. mikroSDK (28292 times)
  9. PID Library (26930 times)
  10. microSD click (26309 times)
Libstock prefers package manager

Package Manager

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]

< Back
mikroSDK Library

13DOF 2 click

Rating:

5

Author: MIKROE

Last Updated: 2019-08-05

Package Version: 1.0.0.0

mikroSDK Library: 1.0.0.0

Category: Motion

Downloaded: 2100 times

Not followed.

License: MIT license  

13DOF 2 click is an advanced 13-axis motion tracking Click board, which utilizes two different sensor ICs onboard: BME680, voc, humidity, pressure and temperature sensor and BMX160, a 9-axis sensor consisting of a 3-axis, low-g accelerometer, a low power 3-axis gyroscope and a 3-axis geomagnetic sensor.

No Abuse Reported

Do you want to subscribe in order to receive notifications regarding "13DOF 2 click" changes.

Do you want to unsubscribe in order to stop receiving notifications regarding "13DOF 2 click" changes.

Do you want to report abuse regarding "13DOF 2 click".

  • Information
  • Comments (0)

mikroSDK Library Blog

13 DOF 2 click

13 DOF 2 click

Native view of the 13 DOF 2 click board.

View full image
13 DOF 2 click

13 DOF 2 click

Front and back view of the 13 DOF 2 click board.

View full image

Library Description

The library contains basic functions for starting both sensors and reading data that the sensors measure.

Key functions:

  • void c13dof2_bmx160_getAxis(uint8_t sensor, T_C13DOF2_BMX160_AXIS *sAxis) - Reads Axis data from the BMX160 sensor (Accel, Gyro, Magnetic).
  • uint16_t c13dof2_bmx160_getStepCounter() - Read Step counter.
  • float c13dof2_bme680_getAmbientData(uint8_t dataIn) - Reads Ambient data from BME680 sensor (Temperature, Pressure and Humidity).

Examples description

The application is composed of three sections :

  • System Initialization - Initialization I2C or SPI module and sets all the necessary GPIO pins.
  • Application Initialization - Initializes the driver init, checks the communication and starts configuration for chips BMX160 and BME680.
  • Application Task - This example reads all parameters from those sensors (Acceleration, Gyro, Magnetic, Temperature, etc.) and shows them on USB UART log.
void applicationTask()
{
    /* BMX160 */
    c13dof2_bmx160_getAxis(_C13DOF2_BMX160_DATA_ACCEL,  &Accel);
    c13dof2_bmx160_getAxis(_C13DOF2_BMX160_DATA_GYRO,   &Gyro);
    c13dof2_bmx160_getAxis(_C13DOF2_BMX160_DATA_MAGNET, &Magnet);

    temperature_bmx160 = c13dof2_bmx160_internalTemperature();
    step_counter = c13dof2_bmx160_getStepCounter();
    c13dof2_bmx160_getInterruptStatus(&status);

    /* BME680 */
    temperature = c13dof2_bme680_getAmbientData(_C13DOF2_BME680_DATA_TEMPERATURE);
    pressure = c13dof2_bme680_getAmbientData(_C13DOF2_BME680_DATA_PRESSURE);
    humidity = c13dof2_bme680_getAmbientData(_C13DOF2_BME680_DATA_HUMIDITY);

    gas = c13dof2_bme680_getGasResistance();

    mikrobus_logWrite( "-------------------------------------------------------" , _LOG_LINE );
    mikrobus_logWrite( "------  BMX160 DATA  ------", _LOG_LINE );
    _displayData_BMX160();

    mikrobus_logWrite( "------  BME680 DATA  ------", _LOG_LINE );
    _displayData_BME680();

    mikrobus_logWrite( " ", _LOG_LINE );

    Delay_ms( 1000 );
}


Additional Functions :

  • void _interruptDetect() - display interupt state (TAP status)
  • void _displayData_BMX160() - display BMIX160 data (Accel, Gyro, Magnetic, Step counter, and internal senzor Temperature)
  • void _displayData_BME680() - display BME680 data (Temperature, Pressure, Humidity and Gas resistance)

Other mikroE Libraries used in the example:

  • I2C library
  • SPI Library
  • UART Library
  • Conversions Library

Additional notes and informations

Depending on the development board you are using, you may need USB UART clickUSB 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.

ALSO FROM THIS AUTHOR

BLE 10 Click

0

BLE 10 Click is a compact add-on board that provides BT/BLE connectivity for any embedded application. This board features the PAN1780-AT, a Bluetooth® 5 Low Energy Module based on Nordic's nRF52840 single-chip controller from Panasonic.

[Learn More]

Vibro Motor 4 Click

0

Vibro Motor 4 Click is a compact add-on board that makes an ideal solution for adding simple haptic feedback in any design. This board features the G1040003D, a coin-sized linear resonant actuator (LRA) that generates vibration/haptic feedback from Jinlong Machinery & Electronics, Inc. Driven by a flexible Haptic/Vibra driver, the DRV2605, G1040003D vibrates in the Z-axis, which is perpendicular to the face of the vibration motor. It draws a maximum of 170mA while producing the highest G force/vibration energy of 2 GRMS. This Click board™ makes an excellent choice for devices with limited battery capacity and for users who require crisp haptic feedback and low power consumption.

[Learn More]

Pressure 6 Click

0

Pressure 6 Click features a simple, yet highly accurate and reliable pressure sensor labeled as BM1386GLV, produced by ROHM. This sensor is a piezo-resistive pressure sensor with internal thermal compensation, which greatly simplifies the pressure reading.

[Learn More]