读
语法
描述
(
返回的加速度,磁场,角速度,并从BNO055溢出数据sensorReadings
,泛滥
)=阅读(bno055
)时间表
格式。取决于样品的数量SamplesPerRead
值在创建指定传感器对象。这些输出参数返回只有当输出格式设置时间表
。
(
返回矩阵的加速度,陀螺仪、磁场、方向、时间戳、和泛滥AMG数据模式。取决于样品的数量accelReadings
,gyroReadings
,magReadings
,时间戳
,泛滥
)=阅读(bno055
)SamplesPerRead
值在创建指定传感器对象。这些输出参数返回只有当输出格式设置矩阵
。
(
返回矩阵的加速度,陀螺仪、磁场、时间戳、泛滥NDOF模式中的数据。取决于样品的数量accelReadings
,gyroReadings
,magReadings
,orientationReadings
,时间戳
,泛滥
)=阅读(bno055
)SamplesPerRead
值在创建指定传感器对象。这些输出参数返回只有当输出格式设置矩阵
。校准BNO055传感器使用前阅读,以确保准确的值读取传感器在NDOF操作模式。
例子
读取数据从传感器NDOF模式作为一个时间表
创建一个arduino
对象。
一个= arduino (“COM4为”,“Uno”,“库”,“I2C”);
创建一个传感器对象附加属性。
imu = bno055 (,“OperatingMode”,“ndof”,“SamplesPerRead”5,“ReadMode”,“最新”)
使用步骤中提到校准传感器校准BNO055传感器。读五个传感器数据的样本datetime
格式。
sensorReadings =阅读(imu)
sensorReadings = 5×4时间表时间加速AngularVelocity磁场取向________________________ _______________________ ______________________________________ ____________________________ ___________________________ 21 - 7 - 2020 16:24:25.538 0 0.35 9.82 0.0032725 - -0.0054542 -0.0021817 - 24.25 -19.375 - -2.75 -0.035997 - 0.0021817 2020年- 7月21日16:24:25.548 0 -0.05 0.32 9.84 -0.0021817 0.0010908 0.0010908 - 24.25 -19.375 - -2.75 -0.035997 - 0.0021817 2020年- 7月21日16:24:25.558 0 -0.03 0.32 9.75 -0.0010908 0.0010908 -0.0010908 - 24.25 -19.375 - -2.75 -0.035997 - 0.0021817 2020年- 7月21日16:24:25.568 0 0 0.34 9.82 0.0010908 -0.0021817 24.25 -19.375 -2.75 -0.035997 - 0.0021817 2020年- 7月21日16:24:25.578 0 0.36 9.77 0.006545 - -0.0010908 -0.0021817 - 23.063 -20.188 - -3.5625 -0.035997 - 0.0021817
从传感器读取数据在AMG模式作为一个时间表
创建一个arduino
对象。
一个= arduino (“COM4为”,“Uno”,“库”,“I2C”);
创建一个传感器对象附加属性。
imu = bno055 (,“OperatingMode”,amg的,“SampleRate”,100,“SamplesPerRead”5)
读五个传感器数据的样本datetime
格式。
sensorReadings =阅读(imu)
sensorReadings = 5×3时间表时间加速AngularVelocity磁场________________________ _______________________ ______________________________________ ____________________________ 21 - 7 - 2020 16:29:51.323 -0.02 0.32 9.87 0.0032725 -0.01309 0.0021817 24.25 -18.375 - 4 2020年- 7月21日16:29:51.333 -0.02 0.32 9.87 0.0032725 -0.0032725 0.0021817 24.25 -18.375 - 4 2020年- 7月21日16:29:51.343 0.02 0.35 9.82 -0.0032725 0.0076358 0.0032725 24.25 -18.375 - 4 2020年- 7月21日16:29:51.353 0.02 0.35 9.82 -0.0032725 0.0021817 0.0010908 23.125 -19.438 - 4 2020年- 7月21日16:29:51.363 0 -0.03 0.32 9.86 -0.0098175 0.0010908 23.125 -19.438 - 4
从传感器读取数据在NDOF模式矩阵
创建一个arduino
对象。
一个= arduino (“COM4为”,“Uno”,“库”,“I2C”);
创建一个传感器对象附加属性。
imu = bno055 (,“SamplesPerRead”5“OutputFormat”,“矩阵”,“OperatingMode”、“ndof”)
使用步骤中提到校准传感器校准BNO055传感器。读五个传感器数据作为样本矩阵。
[accelReadings, gyroReadings magReadings orientationReadings,时间戳,泛滥]=阅读(imu)
accelReadings = -0.0400 0.3000 9.7500 -0.0500 0.3100 9.8400 -0.0200 0.3300 9.8100 0.3400 9.8800 -0.0400 0.3200 9.7700 gyroReadings = 0 0 0.0098 -0.0011 -0.0022 0.0055 0.0011 0.0022 -0.0022 -0.0011 -0.0022 0.0011 -0.0022 -0.0022 -0.0011 magReadings = 23.8750 -20.5625 -4.0000 23.8750 -20.5625 -4.0000 23.8750 -20.5625 -4.0000 23.0625 -20.8750 -4.7500 23.0625 -20.8750 -4.7500 orientationReadings = 0 0 0 0 -0.0338 0.0022 -0.0338 - 0.0022 -0.0338 - 0.0022 -0.0338 - 0.0022 -0.0338 - 0.0022 0时间戳= 5×2020 19:10:07.196 datetime数组31 - 7月31日——2020年7月- 2020 19:10:07.206 31 - 7月- 19:10:07.216 2020年- 7月31日19:10:07.226 2020年- 7月31日19:10:07.236泛滥= 10
从传感器读取数据在AMG模式矩阵
创建一个arduino
对象。
一个= arduino (“COM4为”,“Uno”,“库”,“I2C”);
创建一个传感器对象附加属性。
imu = bno055 (,“SamplesPerRead”5“OutputFormat”,“矩阵”,“OperatingMode”、“amg”)
读五个传感器数据作为样本矩阵。
[accelReadings, gyroReadings magReadings orientationReadings,时间戳,泛滥]=阅读(imu)
accelReadings = -0.0400 0.3000 9.7500 -0.0500 0.3100 9.8400 -0.0200 0.3300 9.8100 0.3400 9.8800 -0.0400 0.3200 9.7700 gyroReadings = 0 0 0.0098 -0.0011 -0.0022 0.0055 0.0011 0.0022 -0.0022 -0.0011 -0.0022 0.0011 -0.0022 -0.0022 -0.0011 magReadings = 23.8750 -20.5625 -4.0000 23.8750 -20.5625 -4.0000 23.8750 -20.5625 -4.0000 23.0625 -20.8750 -4.7500 23.0625 -20.8750 -4.7500时间戳= 5×2020 19:10:07.196 datetime数组31 - 7月31日——2020年7月- 2020 19:10:07.206 31 - 7月- 19:10:07.216 2020年- 7月31日19:10:07.226 2020年- 7月31日19:10:07.236泛滥= 10
输入参数
输出参数
更多关于
版本历史
介绍了R2019a