by MalcolmG on Wed Mar 29, 2023 1:12 pm
Just remember that you need a scheduled function that calls System.Preserve() periodically to write the value to Flash, and set the channel type to "Flash Backed" rather than volatile. If you're not using a GP package as a baseline then you'll need to add System.Preserve() into your package somewhere - most likely in your odometer function. Ideally you don't want to be writing it multiple times a second for the sake of the flash memory, so best to use a condition in the function so it will only be written to flash once every 10-30s.