On the Subject of 14
Who is high school for? High school is 14agers.
T_{n} = current total for each color | ||
D_{n} = current displayed digit | ||
Apply the equation for each separate color. | ||
LED Color | Digit is normal (> 0) | Digit is inverted (< 0) |
White | T_{n+1} = T_{n} + D_{n} | |
---|---|---|
Black | T_{n+1} = T_{n} - D_{n} | |
Red | T_{n+1} = T_{n} + 2D_{n} | |
Blue | T_{n+1} = 2T_{n} + D_{n} | |
Green | T_{n+1} = T_{n} + abs(D_{n}) | |
Magenta | T_{n+1} = T_{n} - abs(D_{n}) | |
Cyan | T_{n+1} = T_{n} + 2D_{n} | T_{n+1} = T_{n} + D_{n} |
Yellow | T_{n+1} = T_{n} + D_{n} | T_{n+1} = T_{n} + 2D_{n} |
Add the value from each color channel to the previous stage’s value.
Note: T_{0} for R, G, B = indicator label if indicator == 1; otherwise SN_{1}, SN_{2}, SN_{3}.
If T_{n} > 35, subtract 36 until T_{n} < 36
If T_{n} < -35, add 36 until T_{n} > -36