Jump to content
I2Cdevlib Forums

Iain Frew

  • Posts

  • Joined

  • Last visited

Iain Frew's Achievements


Newbie (1/14)



  1. Thanks for that Kris. I'm actually using the DMP and not reading the raw values and doing the calculation like you are. I did that initially using Jeff's library and that all works. Looking to take advantage of the DMP processing. If I can't fix it I'll return to the old way. Many thanks!
  2. I did a little more digging on this problem. I enabled the debug statements and homed in on the issue. It turns out its not the mpu.getintstatus() method that is causing the issue. That was a side effect of the underlying problem. The real issue is reading the mpu 6050 fifo. For some reason, when trying to read the fifo even though it reports there is data to be read , the expressif twowire esp32 core library is returning 0 bytes read. This had the knock on effect of the mpu.getintstatus returning the last byte in the fifo whose value was FF. Reading up on some of the issues of the mpu6050 i2c bus and its use of the SDA and SCL lines on other forums, it looks like we have a real problem to be fixed here. Not sure best how to proceed. I see a dev on the expressif/esp32 forum who has worked on previsou issues of using the mpu6050 so I will reach out to him to see if he can help. Just posting this for others who may come across the problem. getfifobytesdmp.txt
  3. Hi, First time posting to this forum and hopefully some folks including Jeff are still reading this. I wrote an app for the Nodemcu esp8266 using the MPU6050 and the i2cdevlib libraries and it works great. I thought I would port to the ESP32 since it has more pins available. Got the code compiled and running but having some issues with the interrupt reset. I have set the ODR to 200Hz so expect ~5ms interrupts. With the code I have based on Jeff's mpu6050_dmp example, I wasn't getting that. I honed the problem down to the following. After the initial interrupt occurs at 5ms, the interrupts are cleared using the mpu.getIntStatus() method. On the esp8266 this works well. However on the esp32, the bits are not cleared but are set to all 1's,. ie. the status returned form this method is integer value 255. This cause the code I have not to work. So finally the question, has anybody got the mpu6050 library to work with esp32 platform yet? if not, any idea why the i2cdev library is returning this value? The sketch I have is attached. along with the output showing the int status value returned. Cheers Iain esp32output.txt testmpu6050esp32.ino
  • Create New...