Packagefunnel.ui
Classpublic class LED

This is the class to express a LED



Public Properties
 PropertyDefined by
  intensity : Number
LED
  value : Number
LED
Public Methods
 MethodDefined by
  
LED(ledPin:Pin, driveMode:uint)
LED
  
blink(interval:Number, times:Number = 1, wave:Function = null):void
LED
  
fadeIn(time:Number = 1000):void
LED
  
fadeOut(time:Number = 1000):void
LED
  
fadeTo(to:Number, time:Number = 1000):void
LED
  
isOn():Boolean
LED
  
off():void
LED
  
on():void
LED
  
stopBlinking():void
LED
  
toogle():void
LED
Public Constants
 ConstantDefined by
  SOURCE_DRIVE : uint = 0
[static]
LED
  SYNC_DRIVE : uint = 1
[static]
LED
Property detail
intensityproperty
intensity:Number  [read-write]

Implementation
    public function get intensity():Number
    public function set intensity(value:Number):void
valueproperty 
value:Number  [read-write]

Implementation
    public function get value():Number
    public function set value(value:Number):void
Constructor detail
LED()constructor
public function LED(ledPin:Pin, driveMode:uint)

Parameters
ledPin:Pin
 
driveMode:uint

Throws
— should be SOURCE_DRIVE or SYNC_DRIVE"))
Method detail
blink()method
public function blink(interval:Number, times:Number = 1, wave:Function = null):void

Parameters
interval:Number — the time interval
 
times:Number (default = 1) — the times of blink
 
wave:Function (default = null) — the wave (default is Osc.SQUARE)

See also

Osc
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-in time (in milliseconds)
fadeTo()method 
public function fadeTo(to:Number, time:Number = 1000):void

Parameters
to:Number — the new intensity to fade
 
time:Number (default = 1000) — the fade time (in milliseconds)
isOn()method 
public function isOn():Boolean

Returns
Boolean — the LED is turned on or not
off()method 
public function off():void

on()method 
public function on():void

stopBlinking()method 
public function stopBlinking():void

toogle()method 
public function toogle():void

Constant detail
SOURCE_DRIVEconstant
public static const SOURCE_DRIVE:uint = 0
SYNC_DRIVEconstant 
public static const SYNC_DRIVE:uint = 1