How to read BNO055 sensor data in a Simulink Model on a BeagleBone Black

조회 수: 5 (최근 30일)
Saksham Soni
Saksham Soni 2016년 12월 1일
편집: Multiplexer 2019년 1월 16일
I am trying to build a real-time application on BeagleBone Black using Simulink. I need to get orientation data from a BNO055 Intelligent 9-axis absolute orientation sensor. I know this can be done by using the Adafruit library in python on the Beaglebone, but I am not able to figure out how to do it using Simulink.

답변 (1개)

Multiplexer
Multiplexer 2019년 1월 16일
편집: Multiplexer 2019년 1월 16일
If you have a C/C++ library for beaglebone that will let you read/send data over I2C (that's what BNO055 uses), then you can either use legacy code tool to generate MEX-C file for simulation and code generation or alternatively an MATLAB Function block with coder.ceval() inside to call C/C++ functions from I2C library.
On Linux based MCU's, reading a hardware interface like I2C usually boils down to reading a specific file from the device memory, so you gonna use the linux basic file IO library and some code to parse data.
https://www.teachmemicro.com/beaglebone-black-i2c-tutorial/

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by