I need help with a function.
I have DATA incoming in such format:
Code: Select all
&11 99EA37E2637A11A2720B99184C2683D607104EC7B6165300180124;
end character is always ;
in between everything can change, including its length
I want to save this DATA in SPI_RAM, but only the last 12 strings received.
As the transmissions keep coming I need a function to delete the older recorded string in SPI_RAM and replace it with the new incoming one.
I know that this string has always got a unique number at location[2] in a hex format, between 1 and C (12 numbers in total),
And I know there is always time and date stamped into the string at its end, for the above example: time = 16:53:00, and date = 18/01/24
Code: Select all
165300180124
So I need to keep all 12 strings in memory at all times, but update and delete just one (the oldest) and replace it with the new incoming one.
thanks,
Regards