Arduino Toolkit - bno055


: bno055

BNO055 9 axis orientation sensor

Methods

: obj = bno055(arObj)
: obj = bno055(arObj, propertyname, propertyvalue ....)

Constructor to create BME280 sensor

Inputs

arObj - the arduino parent object

propertyname, propertyvalue - optional property name, value pairs. Current known properties are: Current properties are:

I2CAddress

I2C address of the sensor (default 0x40)

Bus

I2C bus - 0 or 1 (default 0)

OperatingMode

Operating mode ’ndof’ or ’amg’

Outputs

obj - created object

Example

 
 a = arduino()
 sensor = bno055(a)
 
 
: [C, timestamp] = readTemperature(obj)

Read the temperature

Inputs

obj - the sensor object

Outputs

C - read temperature in deg C.

timestamp - timestamp when read

Example

 
 a = arduino()
 s = bno055(a)
 # get temp
 temp = s.readTemperature
 
 

See also: bno055.

: [readVal, timestamp] = readAcceleration(obj)

Read the acceleration rate

Inputs

obj - the sensor object

Outputs

readVal - the 3 acceleration values

timestamp - timestamp when read

: [readVal, timestamp] = readAngularVelocity(obj)

Read the angular velocity

Inputs

obj - the sensor object

Outputs

readVal - the 3 angular velocity values

timestamp - timestamp when read

: [readVal, timestamp] = readMagneticField(obj)

Read the magnetic field components

Inputs

obj - the sensor object

Outputs

readVal - the 3 magnetic field values

timestamp - timestamp when read

: [readVal, timestamp] = readOrientation(obj)

Read the oriientation components

Inputs

obj - the sensor object

Outputs

readVal - the 3 orientation values

timestamp - timestamp when read

: [readings, overrun] = read(obj)
: [accel, gyro, mag, timestamp, overrun] = read(obj)
: [accel, gyro, mag, orientation, timestamp, overrun] = read(obj)

Read the sensor data

Inputs

obj - the sensor object

Outputs

accel - acceleration reading from sensor.

gyro - angular acceleration reading from sensor.

mag - magnetic field reading from sensor.

orientation - orientation reading from sensor.

timestamp - timestamp when read

overrun - overrun flag.

readings - table structure with fields for Timestamp, Acceleration, AngularVelocity, MagneticField, Orientation.

: inf = readCalibrationStatus(obj)

Read the sensor calibration status

Inputs

obj - the sensor object

Outputs

status - structure containing the calibration information.

Structure fields are:

System

System calibrarion

Accelerometer

Accelerometer calibration status

Gyroscope

Gyroscope calibration status

Magnetometer

Magnetometer calibration status

Values for each will be either ’uncalibrated’, ’partial’ or ’full’.

: inf = info(obj)

Read the sensor info

Inputs

obj - the sensor object

Outputs

inf - structure containing the sensor information.

Structure fields are:

Version

Software firmware version

SensorId

sensor id value

Type

sensor type ’bno055’

: flush(obj)

Flush sensor data

Inputs

obj - the sensor object

Outputs

None

: release(obj)

Release the resources of the sensor

Inputs

obj - the sensor object

Outputs

None