Jump to content
I2Cdevlib Forums

Only reading occasionally


Recommended Posts

I only want to read the sensor on certain occasions (say maybe every 4 seconds or so).   I can make the code work by simply not getting the data but the FIFO overflows.  I can reset the FIFO but that seems ugly and one post said have said FIFO overflows have bad side effects (I've had some occasional hanging).

 

I thought a call to setSleepEnabled(true);  and then call setSleepEnabled(false) before grabbing the data would work but that doesn't seem to.   Is there a way to accomplish this?

 

 

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...