Closed riverajo closed 9 years ago
i agree. within the current implementation, the code executes so quickly that nothing actually flashes. So, from a usability perspective there is no difference, but from a ComSci perspective, it's dirty. I'll think on this one for a while to try for a simplistic solution.
I'm not entirely sure how the physical relay works, but I think storing the currently lit light in the
Relay
class would be a good idea. right now yourturn_on_only
method turns everthing off then turn the chosen color back on. doing it that will cause a delay as it changes the power on all the pins. Also if you are turning the same light on, it will cause it to flash instead of just remain on, which is what I think you would want.