Skip to content

Read/Write lots of data quickly #2609

@NAPtime2

Description

@NAPtime2

I am working with a Adafruit M0 Express, and have hooked it up to the Adafruit 16 bit I2C ADC ADS1115. I would like to read data at 250 Hz (permitted by the I2C ADS module) and save this data onto the flash on the M0 express.

My trouble is if I just have a while True loop where I read data and write data in sequence, I am only able to record data a couple times a second (far short of 250 Hz). I suspect that this is due to the time it takes to write data, but don't know an awful lot about time limitations.

I can come up with partial workaround where I add the data to an list I keep in memory, and then save the list, but this leads to large gaps in the data during the time it takes to save the list.

So my question is:

  1. Is there a faster/more efficient way to save data quickly?
  2. Is there a way I can be adding data to my array and saving it to flash at the same time?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions