Jump to content
I2Cdevlib Forums

New be question mpu6050


Recommended Posts

in this code there is a boolean  (mpuIntStatus & 0x02)

   mpuIntStatus = mpu.getIntStatus();

    // get current FIFO count
    fifoCount = mpu.getFIFOCount();

    // check for overflow (this should never happen unless our code is too inefficient)
    if ((mpuIntStatus & 0x10) || fifoCount == 1024) {
        // reset so we can continue cleanly
        mpu.resetFIFO();
        Serial.println(F("FIFO overflow!"));

    // otherwise, check for DMP data ready interrupt (this should happen frequently)
    } else if (mpuIntStatus & 0x02) 

when i look at the register where mpu.getIntStatus() gets his value  ...Register 58 – Interrupt Status mpu6050 .. I see bit 1 is empty (has no purpose)

soo i dont understand the boolean (mpuIntStatus & 0x02) ... witch seem to do a logic AND operation with this bit

 

2dvj2g3.jpg

 

i must be seeing something wrong ... could anybody help me explaining the boolean (mpuIntStatus & 0x02 ??

 

grtz Ido

 

post-4067-0-76907800-1464262686_thumb.png

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...