Basic Coding is finished. I'm going to clean it up a bit tomorrow but it works.
Pre-warning before I post this. I'm very rusty on C++ LOL, and I'm absolutely positive there's more efficient ways to code this and do classes and functions, but I only know the basics really well at this point, so I had to type everything out longer. I also have to come up with a calculation to give you the dimming point between 2 time frames. I have fall backs in place at the moment to where they will be full intensity when they need to be and lowest intensity when they need to be....
That said though, currently if the controller were to lose power and come back on during the fade times it will just start from the lowest, work as high as it can before it runs out of time during the fade sequence and then go max intensity. Same is true as the unit is going from max intensity to min intensity. If the unit never loses power this is not an issue and the code varies the intensity across the time frame perfectly.
The timeToFade is also kind of tricky. Ideally you want it to be a multiple of 255 for perfect scaling, but the code will take care of rounding errors as it's needed. Again this is more of a function of me being rusty on c++ and not remembering how to write a proper algorythm for that.
Code and pics will be up tomorrow if I don't get slammed at work on stupid stuff. I'll also toss up a video of my multimeter reading the resistance of the digital pot, as I'm not going to install this on my light fixture till I have some of the other stuff done and can replace my ac jr. with it, but it will provide proof of concept so people get brave and make their own