setLED
rbatista edited this page Jul 6, 2016
·
1 revision
Controls a LED.
void setLED(byte color, byte pos);
Argument | Detail | Default |
---|---|---|
color | The color of the LED. Can be set to TM1638_COLOR_RED (for red), TM1638_COLOR_GREEN (for green) or both. Can be set to TM1638_COLOR_NONE to clear the LED. | required |
pos | The LED to set. 0 for the leftmost, 7 for the rightmost | required |
Sets the leftmost LED to green:
module1.setLED(TM1638_COLOR_GREEN, 0);
Sets the leftmost LED to green and red:
module1.setLED(TM1638_COLOR_GREEN + TM1638_COLOR_RED, 0);
Clears the leftmost LED:
module1.setLED(TM1638_COLOR_NONE, 0);