lejos.nxt.addon
Class SensorSelector

java.lang.Object
  extended by lejos.nxt.addon.SensorSelector

public class SensorSelector
extends Object

Factory for I2C sensor implementations. Tests what make of sensor is connected to a port and creates an instance of the appropriate class for a given sensor interface.

Author:
Lawrie Griffiths

Constructor Summary
SensorSelector()
           
 
Method Summary
static Accelerometer createAccelerometer(I2CPort port)
           
static IRTransmitter createIRTransmitter(I2CPort port)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SensorSelector

public SensorSelector()
Method Detail

createAccelerometer

public static Accelerometer createAccelerometer(I2CPort port)
                                         throws SensorSelectorException
Throws:
SensorSelectorException

createIRTransmitter

public static IRTransmitter createIRTransmitter(I2CPort port)
                                         throws SensorSelectorException
Throws:
SensorSelectorException