This is the class to express a full color LED
public function RGBLED(redLEDPin:Pin, greenLEDPin:Pin, blueLEDPin:Pin, driveMode:uint)
Parameters
| redLEDPin:Pin — the pin number of red
|
| |
| greenLEDPin:Pin — the pin number of red
|
| |
| blueLEDPin:Pin — the pin number of red
|
| |
| driveMode:uint — the drive mode
|
See also
ANODE_COMMON
CATHODE_COMMON
KATHODE_COMMON
public function fadeIn(time:Number = 1000):void
Parameters
| time:Number (default = 1000) — the fade-in time (in milliseconds)
|
public function fadeOut(time:Number = 1000):void
Parameters
| time:Number (default = 1000) — the fade-out time (in milliseconds)
|
public function fadeTo(red:Number, green:Number, blue:Number, time:Number = 1):void
Parameters
| red:Number — the new red value to set
|
| |
| green:Number — the new green value to set
|
| |
| blue:Number — the new blue value to set
|
| |
| time:Number (default = 1) — the fade time
|
public function setColor(red:Number, green:Number, blue:Number):void
Parameters
| red:Number — the new red value to set
|
| |
| green:Number — the new green value to set
|
| |
| blue:Number — the new blue value to set
|
public static const ANODE_COMMON:uint = 1
public static const CATHODE_COMMON:uint = 0
public static const KATHODE_COMMON:uint = 0
public static const SOURCE_DRIVE:uint = 0
public static const SYNC_DRIVE:uint = 1