public class TiRGBLED extends Object
| Constructor and Description |
|---|
TiRGBLED(TiPWM pwm,
int redChannelID,
int greenChannelID,
int blueChannelID)
TiRGBLED initialization, default:highLevel=false
|
TiRGBLED(TiPWM pwm,
int redChannelID,
int greenChannelID,
int blueChannelID,
boolean highLevel)
TiRGBLED initialization
|
| Modifier and Type | Method and Description |
|---|---|
int |
getBlueBrightness()
Gets the current blue brightness level
|
int |
getBlueChannelID()
Gets the blue channel id
|
int |
getFrequency()
Gets the current frequency
|
int |
getGreenBrightness()
Gets the current green brightness level
|
int |
getGreenChannelID()
Gets the green channel id
|
int |
getRedBrightness()
Gets the current red brightness level
|
int |
getRedChannelID()
Gets the red channel id
|
void |
setBlueBrightness(int level)
Set blue brightness level
|
void |
setFrequency(int frequency)
Set the frequency
|
void |
setGreenBrightness(int level)
Set green brightness level
|
void |
setRedBrightness(int level)
Set red brightness level
|
void |
updateBrightness()
Update the red,green,and blue brightness
|
public TiRGBLED(TiPWM pwm, int redChannelID, int greenChannelID, int blueChannelID) throws IOException
pwm - TiPWM object[IN]redChannelID - read channel id[IN]greenChannelID - green channel id[IN]blueChannelID - blue channel id[IN]IOExceptionpublic TiRGBLED(TiPWM pwm, int redChannelID, int greenChannelID, int blueChannelID, boolean highLevel) throws IOException
pwm - TiPWM object[IN]redChannelID - read channel id[IN]greenChannelID - green channel id[IN]blueChannelID - blue channel id[IN]highLevel - true:high level active, false:low level active[IN]IOExceptionpublic int getBlueBrightness()
throws IOException
IOExceptionpublic int getBlueChannelID()
public int getFrequency()
throws IOException
IOExceptionpublic int getGreenBrightness()
throws IOException
IOExceptionpublic int getGreenChannelID()
public int getRedBrightness()
throws IOException
IOExceptionpublic int getRedChannelID()
public void setBlueBrightness(int level)
throws IOException
level - brightness level, range:0-255IOExceptionpublic void setFrequency(int frequency)
throws IOException
frequency - frequency value,default:1000(1KHz), unit:HzIOExceptionpublic void setGreenBrightness(int level)
throws IOException
level - brightness level, range:0-255IOExceptionpublic void setRedBrightness(int level)
throws IOException
level - brightness level, range:0-255IOExceptionpublic void updateBrightness()
throws IOException
IOException