I am getting error message about MPU6050 sensor on Arduino when I try to control my quadcopter system
11 次查看(过去 30 天)
显示 更早的评论
I am having an error message during running the simulink model about my quadcopter controlling. Sometimes I can get the values from sensor for an half minute until my quadcopter moves roughly. (so I can't set the parameters about PID block cause I cant see how it effects the system.) Sometimes I don't give energy to brushless motors and I click run button and my model starts to work and after about half minute I get this error message again. I checked my MPU cables and they stay stable. I can get values without cutting from Arduino application but in Simulink, something is going wrong. Can you help me please?
---------------------------------------------------------------------------------------------------------------------------------
An error occurred while running the simulation and the simulation was terminated
Caused by:
- MATLAB System block 'fonksiyon/MPU6050 IMU Sensor' error occurred when invoking 'stepImpl' method of 'codertarget.arduinobase.internal.arduinoMPU6050'. The error was thrown from ' 'C:\ProgramData\MATLAB\SupportPackages\R2021a\toolbox\target\shared\ioserver\+matlabshared\+ioclient\+peripherals\I2C.p' at line 0 'C:\ProgramData\MATLAB\SupportPackages\R2021a\toolbox\target\shared\ioserver\+matlabshared\+ioclient\+peripherals\I2C.p' at line 0 'C:\ProgramData\MATLAB\SupportPackages\R2021a\toolbox\target\shared\devicedrivers\+matlabshared\+devicedrivers\+blocks\I2CBlock.p' at line 0 'C:\ProgramData\MATLAB\SupportPackages\R2021a\toolbox\target\supportpackages\arduinobase\+codertarget\+arduinobase\+internal\arduinoMPU6050.p' at line 0 'C:\ProgramData\MATLAB\SupportPackages\R2021a\toolbox\target\supportpackages\arduinobase\+codertarget\+arduinobase\+internal\arduinoMPU6050.p' at line 0 'C:\ProgramData\MATLAB\SupportPackages\R2021a\toolbox\target\supportpackages\arduinobase\+codertarget\+arduinobase\+internal\arduinoMPU6050.p' at line 0'.
- Unable to read the data from the I2C device. Check the connections between the hardware and device, For MATLAB clear the device object and try again. For Simulink, stop the simulation and start again.
0 个评论
回答(1 个)
Ralf Müller
2021-10-24
Any progress on this?
I'm getting the exact same error. with mpu6050
I tried with a basic model just containing the MPU6050 block from the simulink arduino support package and a scope.
Any help appreciated!
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Modeling 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!