Three green LED's in a ziggurat-shaped cardboard enclosure react to a light sensor by slowly increasing in brightness as ambient light dims, and vice-versa.
I noticed that when the LED's are lit in their lower brightness range, the apparent change in brightness was very noticeable as they changed in 1-increment steps. In order to make the change in light intensity appear smoother (especially since I am tweening their values slowly), I stagger the values of the 3 LED's over time in this kind of pattern --
0,0,0 | 0,0,1 | 0,1,1 | 1,1,1 | 1,1,2 | 1,2,2, | 2,2,2 | 2,2,3, etc
-- rather than applying the same incremented integer value to all three LED's simultaneously...
Recent Comments