com.sun.spot.sensorboard.io
Class ScalarInput
java.lang.Object
com.sun.spot.sensorboard.io.ScalarInput
- All Implemented Interfaces:
- IScalarInput
- Direct Known Subclasses:
- LightSensor
public class ScalarInput
- extends Object
- implements IScalarInput
simple concrete implementation of IScalarInput.
ScalarInput
public ScalarInput(PinDescriptor idx,
int r,
IADCController cntrl)
getValue
public int getValue()
- Specified by:
getValue in interface IScalarInput
- Returns:
- current value of the input
getRange
public int getRange()
throws IOException
- Specified by:
getRange in interface IScalarInput
- Returns:
- maximum possible value that could be returned from the input device
- Throws:
IOException
getVoltage
public float getVoltage()
- Get the ADC value in voltage
- Returns:
- Voltage applied to the ADC pin.
Copyright © 2007 Sun Microsystems, Inc. All Rights Reserved.