Packageorg.MARS.robot.sensors
Classpublic class EdgeSensor
InheritanceEdgeSensor Inheritance AbstractSensor Inheritance AbstractElectronicDevice

The simple edge sensor which uses its shape to locate the edge of the table.

See also

getReading()


Public Properties
 PropertyDefined by
 InheritednumberOfPorts : Number
Get the number of IO ports in the device.
AbstractElectronicDevice
 Inheritedshape : Shape
The shape of the sensor
AbstractSensor
 Inheritedtype : Class
The type of the sensor
AbstractSensor
Protected Properties
 PropertyDefined by
 Inherited_ports : Array
AbstractElectronicDevice
 Inherited_shape : Shape
AbstractSensor
 Inherited_type : Class
AbstractSensor
Public Methods
 MethodDefined by
  
Creates a sensor with the given shape
EdgeSensor
 Inherited
getPort(portNumber:Number):IOPort
Get a certain IO port by its number
AbstractElectronicDevice
  
getReading():void
Determine if the sensor is on the table and set the output port accordingly: LOW if the sensor is on the table and HIGH if the sensor is off the table.
EdgeSensor
Constructor detail
EdgeSensor()constructor
public function EdgeSensor(shape:Shape)

Creates a sensor with the given shape

Parameters
shape:Shape

See also

Shape
Method detail
getReading()method
public override function getReading():void

Determine if the sensor is on the table and set the output port accordingly: LOW if the sensor is on the table and HIGH if the sensor is off the table.

See also

Environment.isOnTable()