Package lejos.utility
Class SensorSelector
- java.lang.Object
-
- lejos.utility.SensorSelector
-
public class SensorSelector extends java.lang.ObjectFactory 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
Constructors Constructor Description SensorSelector()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static SensorModecreateAccelerometer(I2CPort port)static IRTransmittercreateIRTransmitter(I2CPort port)
-
-
-
Method Detail
-
createAccelerometer
public static SensorMode createAccelerometer(I2CPort port) throws SensorSelectorException
- Throws:
SensorSelectorException
-
createIRTransmitter
public static IRTransmitter createIRTransmitter(I2CPort port) throws SensorSelectorException
- Throws:
SensorSelectorException
-
-