Migrating wiki contents from Google Code
This commit is contained in:
32
setLED.md
Normal file
32
setLED.md
Normal file
@@ -0,0 +1,32 @@
|
||||
# setLED Reference (TM1638) #
|
||||
|
||||
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_ |
|
||||
|
||||
# Example #
|
||||
|
||||
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);
|
||||
```
|
||||
Reference in New Issue
Block a user