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]IOException
public 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]IOException
public int getBlueBrightness() throws IOException
IOException
public int getBlueChannelID()
public int getFrequency() throws IOException
IOException
public int getGreenBrightness() throws IOException
IOException
public int getGreenChannelID()
public int getRedBrightness() throws IOException
IOException
public int getRedChannelID()
public void setBlueBrightness(int level) throws IOException
level
- brightness level, range:0-255IOException
public void setFrequency(int frequency) throws IOException
frequency
- frequency value,default:1000(1KHz), unit:HzIOException
public void setGreenBrightness(int level) throws IOException
level
- brightness level, range:0-255IOException
public void setRedBrightness(int level) throws IOException
level
- brightness level, range:0-255IOException
public void updateBrightness() throws IOException
IOException