I was under the assumption that the example was showing me a better way to write code for a sunrise sunset and clouds, so I would no longer be using my hacked together code.
My idea is to simulate sunlight during the day. Specifically:
I would like to be able to set the ON time with a separate "up" and "down" tactile switch with a 16 hour photo-period. ON being the start of sunrise and the lights fading from 0%/OFF up to and ideally reaching 90% approximately 7 hours after the set ON time, holding at 90% for approximately 2 hours then fading back down to 0%/OFF after 16 hours
I would like to simulate clouds passing over during the "day" by having random shorter fade periods (from a few minutes to an hour) down to different random intensities (with a threshold to keep the lights from going so low they're essentially off) from whatever the intensity happens to be at that time, and fading back to the intensity it should be based off the original sunrise/set fading schedule
I would like to also control a relay or device to provide a momentary ground to turn on and off the computer power supply I am using to power the LED drivers so it isn't on all the time while the drivers are sitting at 0% PWM
Finally I would like to use an LCD to display; the current time, the ON and OFF times as set by the push buttons, and the current light intensity between 0-100%
Ideally I'd like to be able to use a TFT over I2C to display the aforementioned as well as a cloud or sun icon at the appropriate times with the current intensity under it. Also incorporating the set time and future add-ons like CO2 or Humidity displays and controls in a menu so everything can be done via touch screen but I'm trying to do it a little at a time as I have lofty goals from where I am starting.