Raspberry Pi Zero W sampling rate of sensor over i2c is too low.
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hello,
I am interfacing with a Raspberry Pi Zero W over wifi. I am communicating with an MPU9250 acceleromter over i2c. I have the sampling rate set to 250Hz, however, I when I continously sample the sensor in matlab I only collect 10 samples per seconds.
One solution I have tried is to change the baudrate from 100,000 to 400,000. I have attempted is the enableI2C(mypi, 400000) howver I recieved the following error: "Warning: Cannot configure baudrate parameter for i2c_bcm2835"
I then attempted to run the following comman disableI2C(mypi), but recevied the following error:
"Cannot disable I2C peripheral"
I checked the /boot/config.txt file in vi and it told me my baudrate is set to 400,000, but matlab states it is set to 100,000. Below is picture of the config file.

My ultimate goal is increse the sampling rate of the sensor such that I am effectively sampling at a frequency of approximately 250 Hz instead of 10Hz. I thought perhaps changing the baudrate to 400,000 kb/s would might do solve my problem, but I'm not sure. And even if the baud is the issue I am unable to change the baudrate through Matlab currently.
1 Kommentar
Joan Taveras
am 26 Feb. 2021
Hello Jhon,
I am currently facing the same problem. I am working with LC709203F fuel gauge sensor measuring voltage and SoC of a battery over the I2C. I was wondering if you can help me to solve my issue, any subjection will be appreciated.
Thank you in advance,
Antworten (0)
Siehe auch
Kategorien
Mehr zu MATLAB Support Package for Raspberry Pi Hardware finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!