Packageorg.MARS.robot.actuators
Classpublic class LED
InheritanceLED Inheritance AbstractElectronicDevice
ImplementsIActuator

An LED which switches on and off depending on the state of its IO Port

See also

action()


Public Properties
 PropertyDefined by
 InheritednumberOfPorts : Number
Get the number of IO ports in the device.
AbstractElectronicDevice
  shape : Shape
[read-only] The shape of the actuator
LED
Protected Properties
 PropertyDefined by
 Inherited_ports : Array
AbstractElectronicDevice
Public Methods
 MethodDefined by
  
LED(position:Vector, size:Number, onColor:uint = 0xff0000, offColor:uint = 0xcccccc)
Create a round LED based on the following parameters:
LED
  
action():void
The function which is called on every step of the physics engine.
LED
 Inherited
getPort(portNumber:Number):IOPort
Get a certain IO port by its number
AbstractElectronicDevice
Property detail
shapeproperty
shape:Shape  [read-only]

The shape of the actuator

Implementation
    public function get shape():Shape
Constructor detail
LED()constructor
public function LED(position:Vector, size:Number, onColor:uint = 0xff0000, offColor:uint = 0xcccccc)

Create a round LED based on the following parameters:

Parameters
position:Vector — - position of the LED relative to the center of the robot
 
size:Number — - radius of the LED
 
onColor:uint (default = 0xff0000) — - color of the LED when it is on (0xff0000 by default)
 
offColor:uint (default = 0xcccccc) — - color of the LED when it is off (0xcccccc by default)
Method detail
action()method
public function action():void

The function which is called on every step of the physics engine. Changes the color of the LED depending on the value of the IO Port.