Class that stores state and functions for interacting with the BNO08x 9-DOF Orientation IMU Fusion Breakout.
More...
#include <Adafruit_BNO08x.h>
|
sh2_ProductIds_t | prodIds |
| The product IDs returned by the sensor.
|
|
|
virtual bool | _init (int32_t sensor_id) |
| Initializer for post i2c/spi init. More...
|
|
|
sh2_Hal_t | _HAL |
| The struct representing the SH2 Hardware Abstraction Layer.
|
|
Class that stores state and functions for interacting with the BNO08x 9-DOF Orientation IMU Fusion Breakout.
◆ Adafruit_BNO08x()
Adafruit_BNO08x::Adafruit_BNO08x |
( |
int8_t |
reset_pin = -1 | ) |
|
◆ begin_I2C()
bool Adafruit_BNO08x::begin_I2C |
( |
uint8_t |
i2c_address = BNO08x_I2CADDR_DEFAULT , |
|
|
TwoWire * |
wire = &Wire , |
|
|
int32_t |
sensor_id = 0 |
|
) |
| |
Sets up the hardware and initializes I2C.
- Parameters
-
i2c_address | The I2C address to be used. |
wire | The Wire object to be used for I2C connections. |
sensor_id | The unique ID to differentiate the sensors from others |
- Returns
- True if initialization was successful, otherwise false.
◆ begin_UART()
bool Adafruit_BNO08x::begin_UART |
( |
HardwareSerial * |
serial, |
|
|
int32_t |
sensor_id = 0 |
|
) |
| |
Sets up the hardware and initializes UART.
- Parameters
-
serial | Pointer to Stream (HardwareSerial/SoftwareSerial) interface |
sensor_id | The user-defined ID to differentiate different sensors |
- Returns
- true if initialization was successful, otherwise false.
◆ begin_SPI()
bool Adafruit_BNO08x::begin_SPI |
( |
uint8_t |
cs_pin, |
|
|
uint8_t |
int_pin, |
|
|
SPIClass * |
theSPI = &SPI , |
|
|
int32_t |
sensor_id = 0 |
|
) |
| |
Sets up the hardware and initializes hardware SPI.
- Parameters
-
cs_pin | The arduino pin # connected to chip select |
int_pin | The arduino pin # connected to BNO08x INT |
theSPI | The SPI object to be used for SPI connections. |
sensor_id | The user-defined ID to differentiate different sensors |
- Returns
- true if initialization was successful, otherwise false.
◆ wasReset()
bool Adafruit_BNO08x::wasReset |
( |
void |
| ) |
|
Check if a reset has occured.
- Returns
- true: a reset has occured false: no reset has occoured
◆ enableReport()
bool Adafruit_BNO08x::enableReport |
( |
sh2_SensorId_t |
sensorId, |
|
|
uint32_t |
interval_us = 10000 |
|
) |
| |
Enable the given report type.
- Parameters
-
sensorId | The report ID to enable |
interval_us | The update interval for reports to be generated, in microseconds |
- Returns
- true: success false: failure
◆ getSensorEvent()
bool Adafruit_BNO08x::getSensorEvent |
( |
sh2_SensorValue_t * |
value | ) |
|
Fill the given sensor value object with a new report.
- Parameters
-
value | Pointer to an sh2_SensorValue_t struct to fil |
- Returns
- true: The report object was filled with a new report
-
false: No new report available to fill
◆ _init()
bool Adafruit_BNO08x::_init |
( |
int32_t |
sensor_id | ) |
|
|
protectedvirtual |
Initializer for post i2c/spi init.
- Parameters
-
sensor_id | Optional unique ID for the sensor set |
- Returns
- True if chip identified and initialized
The documentation for this class was generated from the following files: