Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

3
  • You could change the limits to 0 to win_size - 1 so that they are compatible with C arrays. Then cycle around the array putting a new float into it at the current index while updating the sum and rolling average. Then update the index. Commented Sep 1, 2021 at 23:59
  • 2
    Are you asking about how to read the acceleration from the MPU6050? Or are you asking about how to compute a running average? Commented Sep 2, 2021 at 7:33
  • @EdgarBonet, Thank You for your reply. You have nudged me in the right direction by telling me about running average. I didn't know that this formula was of calculating running average since nothing was mentioned in the research paper. Commented Sep 3, 2021 at 9:35