jrowberg / i2cdevlib

I2C device library collection for AVR/Arduino or other C++-based MCUs
http://www.i2cdevlib.com
3.92k stars 7.52k forks source link

cut-down example code without FIFO and without interrupt pin? #412

Closed dsyleixa closed 5 years ago

dsyleixa commented 5 years ago

can you please provide a cut-down example code without using FIFO and without needing an interrupt pin?

The MPU6050 shall be polled just by a simple MPU read command, multiple readings seperated just by arbitrary delay() of e.g., 50 up to 500ms ( or perhaps more) in an infinite loop.

substantiation |   FIFO currently makes the program always hang up small cpu boards (Adafruit Feather, Itsybitsy) have too few free pins broken out (e.g., no useable pins 2,3,4,5,7,8)

jrowberg commented 5 years ago

To my knowledge, this is only possible when the DMP is not being used. You can use polling as you specify only if you are reading raw data from the accel/gyro registers (as the "raw" example does). I have never seen any examples or documentation that suggest you can use the DMP without the FIFO.

dsyleixa commented 5 years ago

ok, thanks for your reply - I didn't know that about the required FIFO for DMP usage.