public class Led
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
LED_FRONT
Constant for id of front LED pair
|
static int |
LED_LEFT
Constant for id of left LED pair
|
static int |
LED_REAR
Constant for id of rear LED pair
|
static int |
LED_RIGHT
Constant for id of right LED pair
|
Constructor and Description |
---|
Led(int id)
Creates a Led instance with given ID.
|
Modifier and Type | Method and Description |
---|---|
static void |
clearAll()
Turns off all 4 LED pairs.
|
void |
setColor(java.awt.Color color)
Sets the RGB color value of the two LEDs with current ID.
|
void |
setColor(int red,
int green,
int blue)
Sets the RGB color value of the two LEDs with current ID.
|
static void |
setColorAll(java.awt.Color color)
Sets the RGB color value of all LEDs.
|
static void |
setColorAll(int red,
int green,
int blue)
Sets the RGB color value of all LEDs.
|
public static int LED_FRONT
public static int LED_LEFT
public static int LED_REAR
public static int LED_RIGHT
public Led(int id)
id
- the LED identifierpublic void setColor(int red, int green, int blue)
red
- the red color component 0..255green
- the greed color component 0..255blue
- the blue color component 0..255public void setColor(java.awt.Color color)
color
- the RGB colorpublic static void setColorAll(int red, int green, int blue)
red
- the red color component 0..255green
- the greed color component 0..255blue
- the blue color component 0..255public static void setColorAll(java.awt.Color color)
color
- the RGB colorpublic static void clearAll()