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