2

I would like to save data that I am receiving from API calls in a char array. The problem is that the data is around 80 kB, and my Arduino IoT 33 only has 32 kB of memory.

It will save data in a char array up to 25000 bytes, but when I go to 30000 bytes or above the Arduino freezes. When I copy-paste the entire data to a char array without specifying the size it works fine, but when receiving data over the API in chunks of 10 kB it won't save the entire 80 kB. Is there a way around this?

10
  • why do you want to store all that data? process it right away.
    – Juraj
    Apr 30, 2020 at 18:27
  • well, it is basically a hexadecimal array to update an E-Ink Display. I need all of it at the same time.
    – Amir
    Apr 30, 2020 at 18:28
  • 1
    I will be updating my display probably 5 to 6 times a day. That should be enough right?
    – Amir
    Apr 30, 2020 at 18:37
  • 1
    I will try that. Thanks a lot :)
    – Amir
    Apr 30, 2020 at 18:38
  • 2
    what do you mean by hexadecimal array? ... are you storing text, not bytes?
    – jsotola
    Apr 30, 2020 at 19:08

1 Answer 1

0

You can use the flash memory of the SAMD21 MCU used on the Nano 33 IoT, if you don't write too often. Flash memories have a limited count of write-erase cycles. It is guarantied for 10000 writes.

For Arduino SAMD boards like the Nano 33 IoT you can use the FlashStorage library. The library is in the Library Manager.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.