| Package | org.MARS.robot.sensors |
| Class | public class TouchSensor |
| Inheritance | TouchSensor AbstractSensor AbstractElectronicDevice |
See also
| Method | Defined by | ||
|---|---|---|---|
|
TouchSensor(shape:Shape)
Creates a sensor with the given shape
| TouchSensor | ||
![]() |
Get a certain IO port by its number
| AbstractElectronicDevice | |
|
getReading():void
Determine if the sensor collides with an object and set the
output port accordingly: HIGH if the sensor detects a collision
and LOW if the sensor does not.
| TouchSensor | ||
| TouchSensor | () | constructor |
public function TouchSensor(shape:Shape)Creates a sensor with the given shape
Parametersshape:Shape |
See also
| getReading | () | method |
public override function getReading():voidDetermine if the sensor collides with an object and set the output port accordingly: HIGH if the sensor detects a collision and LOW if the sensor does not.
See also