Packagefunnel.ui
Classpublic class RGBLED

This is the class to express a full color LED



Public Methods
 MethodDefined by
  
RGBLED(redLEDPin:Pin, greenLEDPin:Pin, blueLEDPin:Pin, driveMode:uint)
RGBLED
  
fadeIn(time:Number = 1000):void
RGBLED
  
fadeOut(time:Number = 1000):void
RGBLED
  
fadeTo(red:Number, green:Number, blue:Number, time:Number = 1):void
RGBLED
  
setColor(red:Number, green:Number, blue:Number):void
RGBLED
Public Constants
 ConstantDefined by
  ANODE_COMMON : uint = 1
[static]
RGBLED
  CATHODE_COMMON : uint = 0
[static]
RGBLED
  KATHODE_COMMON : uint = 0
[static]
RGBLED
  SOURCE_DRIVE : uint = 0
[static]
RGBLED
  SYNC_DRIVE : uint = 1
[static]
RGBLED
Constructor detail
RGBLED()constructor
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
Method detail
fadeIn()method
public function fadeIn(time:Number = 1000):void

Parameters
time:Number (default = 1000) — the fade-in time (in milliseconds)
fadeOut()method 
public function fadeOut(time:Number = 1000):void

Parameters
time:Number (default = 1000) — the fade-out time (in milliseconds)
fadeTo()method 
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
setColor()method 
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
Constant detail
ANODE_COMMONconstant
public static const ANODE_COMMON:uint = 1
CATHODE_COMMONconstant 
public static const CATHODE_COMMON:uint = 0
KATHODE_COMMONconstant 
public static const KATHODE_COMMON:uint = 0
SOURCE_DRIVEconstant 
public static const SOURCE_DRIVE:uint = 0
SYNC_DRIVEconstant 
public static const SYNC_DRIVE:uint = 1