Circularbuffer vs EEPROM.read/write #31
-
Hi, I would like to restore the value of my buffer during my arduino bootup. Is there a way to do it? My buffer is define like that and work well: I backup like this:
I try to restore like that on the SETUP part of my program
but I cannot I received the following error during the compile:
I also tryed some other way to restore but never find the good one.... So for my bad english ;o) Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
The message is quite obvious, but to put it simple, you are trying to treat the buffer as if it was an array and use the [] to identify an item in the buffer and perform an assignment: that is not going to work. The [] operator can be used to read data from the buffer, not to perform assignments, that is why you find the [] operator listed in the retrieve data section of the readme but not in the store data. What you can do is replace your
with
or even better with
|
Beta Was this translation helpful? Give feedback.
The message is quite obvious, but to put it simple, you are trying to treat the buffer as if it was an array and use the [] to identify an item in the buffer and perform an assignment: that is not going to work.
The [] operator can be used to read data from the buffer, not to perform assignments, that is why you find the [] operator listed in the retrieve data section of the readme but not in the store data.
What you can do is replace your
with