ukcrobots.core
Class LightSensor

java.lang.Object
  |
  +--ukcrobots.core.Sensor
        |
        +--ukcrobots.core.LightSensor

public class LightSensor
extends Sensor

Model a light sensor. Readings are returned as a percentage value.

Version:
2001.12.20
Author:
d.j.barnes @at@ kent.ac.uk

Constructor Summary
LightSensor(int id)
          Create a light sensor.
 
Methods inherited from class ukcrobots.core.Sensor
activate, addSensorListener, getDevice, passivate, readValue, removeSensorListener
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait
 

Constructor Detail

LightSensor

public LightSensor(int id)
            throws NoSuchDeviceException
Create a light sensor.

Parameters:
id - Which input port the sensor is connected to: 1, 2, or 3.
Throws:
NoSuchDeviceException - if the port id is not recognised.