Matlab fails to detect sensor

7 vues (au cours des 30 derniers jours)
Bhavinkumar Arya
Bhavinkumar Arya le 23 Oct 2020
Commenté : Bence Bábi le 25 Fév 2023
I am trying to learn sensor fusion using arduino and mpu9250 sensor.
a = arduino('COM3','Uno','Libraries','I2C');
sensorObj = mpu9250(a)
matlab detects the arduino but when i give mpu9250(a) command the output is
Expected sensor not detected. Connect the right sensor to the hardware and try again.
is there a problem with mpu9250 or there is small tweak which can fix this issue.
  11 commentaires
Gayatri Menon
Gayatri Menon le 10 Jan 2022
hey,
the above link is not working for me.
Bence Bábi
Bence Bábi le 25 Fév 2023
I got this error too.
https://www.mathworks.com/help/supportpkg/arduinoio/ug/troubleshoot-sensors.html
Based on this link, the problem was solved. By replacing twi.c and twi.h, I got the real values.

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur MATLAB Support Package for Arduino Hardware dans Help Center et File Exchange

Produits


Version

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by