| Package | org.MARS.robot.actuators |
| Class | public class LED |
| Inheritance | LED AbstractElectronicDevice |
| Implements | IActuator |
See also
| Property | Defined by | ||
|---|---|---|---|
![]() | numberOfPorts : Number
Get the number of IO ports in the device.
| AbstractElectronicDevice | |
| shape : Shape
[read-only] The shape of the actuator
| LED | ||
| Method | Defined by | ||
|---|---|---|---|
|
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 | ||
![]() |
Get a certain IO port by its number
| AbstractElectronicDevice | |
| shape | property |
| LED | () | constructor |
public function LED(position:Vector, size:Number, onColor:uint = 0xff0000, offColor:uint = 0xcccccc)Create a round LED based on the following parameters:
Parametersposition: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)
|
| action | () | method |
public function action():voidThe 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.