File Exchange

image thumbnail

Arduino MPU9150 Driver

version (29 KB) by Techsource Technical Team
Visualize signals from MPU9150 in Simulink


Updated 14 Jul 2016

View License

By Esther Ling, Edu Engineer.
A driver block written using the S-Function builder to stream accelerometer and gyro values from the IMU MPU9150 into Simulink. Connect the IMU to an Arduino Mega and run in external mode.

Complements the blog post:

Cite As

Techsource Technical Team (2021). Arduino MPU9150 Driver (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (4)


Hello I'm inspired with your code; I'm working with arduino UNO and seed studio canbus shield (SPI communication). I done the acquisition with succes in matlab but I want to do it in simulink and I don't knew if the code you provide here will be useful.
I tryed to use Serial receive block to communicate with the Arduino and the SPI block to communicate both arduino end the sheild but it doesn't work .
So what I want to knew is that :
when we communicate an arduino in simulink, we should to do an sFunction and programm all the necessar libraries to do the acquisition?
Or we have juste to programm the arduino in arduino IDE and then use tour programm to do generate the C file in simmulink ????



carlos andres

MATLAB Release Compatibility
Created with R2015a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

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

Start Hunting!