It annoyed me that the screensaver would always revert to red after a restart.
I originally planned on having the last color used be saved into the EEPROM, but cannot figure that feature out yet, so this is the next best thing.
Now, when the screensaver is activated, it reads the value of the pot first and sets the color accordingly. This ends up giving the screensaver some dynacism, because the pot value might be different each time the screensaver is activated, depending on the usage of the unit in the interim.
The code to change the screensaver color based off the pot value is used in multiple places, and was therefore abstracted into its own private function call.
It annoyed me that the screensaver would always revert to red after a restart.
I originally planned on having the last color used be saved into the EEPROM, but cannot figure that feature out yet, so this is the next best thing.
Now, when the screensaver is activated, it reads the value of the pot first and sets the color accordingly. This ends up giving the screensaver some dynacism, because the pot value might be different each time the screensaver is activated, depending on the usage of the unit in the interim.
The code to change the screensaver color based off the pot value is used in multiple places, and was therefore abstracted into its own private function call.