Announcement

Collapse
No announcement yet.

Storing a stream of float values in an array?

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

    Storing a stream of float values in an array?

    Hi,

    I'm building an application that takes in sensor data from an arduino, I'd like to run some smoothing on the data and to do so I need to store a certain timeframe of values in an array.

    So how can I store the last 10 values sent, in an array, and then append the newest value in once we reach 10 values and kick out the oldest?

    Thank you.

    #2
    Remove entry zero, the whole array shifts back one(now ranges from zero to eight), add newest entry (puts it at the end, making entry nine for ten total entries).

    Comment

    Working...
    X