A library of the 9-Axis Sensor BNO055 from Bosch Sensortec.
Requires the I2C-Master library - Link
Diff: bno055.cpp
- Revision:
- 6:3dcf44b8289a
- Parent:
- 3:ffc741483987
- Child:
- 7:ccb2dcdfac08
--- a/bno055.cpp Thu Jul 11 11:12:04 2019 +0000 +++ b/bno055.cpp Thu Jul 11 11:31:55 2019 +0000 @@ -100,9 +100,9 @@ * contain the values, which are used in the programm. * * <table> - * <caption id="multi_row">Complex table</caption> + * <caption>Measurement Unit Formats</caption> * <tr><th>Type <th>Formats <th>Code - * <tr><td>Orientation <td>Windows, Android - this changes the ranges of the axis. <td>WINDOWS, ANDROID + * <tr><td>Orientation <td>Windows, Android - this changes the ranges of the axis <td>WINDOWS, ANDROID * <tr><td>Temperature <td>Celsius, Fahrenheit <td>CELSIUS, FAHRENHEIT * <tr><td>Euler <td>Degree, Radians <td>DEGREE, RADIANS * <tr><td>Gyroscope <td>degree per seconds, radian per seconds <td>DEGREE_PER_SEC, RADIAN_PER_SEC @@ -137,11 +137,19 @@ m_i2c_master.i2c_writeBits(m_bno055_address, UNIT_SEL, new_unit_data, MASK_UNIT_SEL); } +/** + * @brief Not Finished + */ void BNO055::getUnitFormat(void) { } +/** + * @brief Get IDs + * + * Read the datasheet, what exactly these IDs are. The data is accessible through the <em>id</em>-struct (object.id.xxx). + */ void BNO055::getIDs(void) { uint8_t dataArray[7]; @@ -164,6 +172,21 @@ #endif } +/** + * @brief Sets the Power Mode + * + * All of the information aren't definitive or could be straight up wrong. It is therefore highly recommended to read the datasheet of the BNO055. + * + * <table> + * <caption>Power Modes</caption> + * <tr><th>Type <th>Description + * <tr><td>POWER_NORMAL <td>All sensors are activated + * <tr><td>POWER_LOW_POWER_MODE <td>If no action is detected for a configurable duration (default 5 seconds), the system is put into low power mode. + * <tr><td>POWER_SUSPEND_MODE <td>System is paused and sensors and mcu is put into sleep mode. + * </table> + * + * @param new_power_mode New Power Mode + */ void BNO055::setPowerMode(bno055_powermode_t new_power_mode) { if(new_power_mode != mode.power) @@ -189,6 +212,11 @@ } } +/** + * @brief Returns the currently used Power Mode + * + * @return uint8_t Currently used Power Mode + */ uint8_t BNO055::getPowerMode(void) { mode.power = m_i2c_master.i2c_read(m_bno055_address, PWR_MODE);