|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectioio.lib.impl.AbstractResource
ioio.lib.impl.AbstractPin
ioio.lib.impl.AnalogInputImpl
public class AnalogInputImpl
| Method Summary | |
|---|---|
void |
close()
|
void |
disconnected()
|
float |
getReference()
Gets the maximum value against which AnalogInput.read() values are scaled. |
float |
getVoltage()
Gets the analog input reading, as an absolute voltage in Volt units. |
float |
read()
Gets the analog input reading, as a scaled real value between 0 and 1. |
void |
setValue(int value)
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public float getVoltage()
throws java.lang.InterruptedException,
ConnectionLostException
AnalogInputIt typically takes a few milliseconds between when the instance is created and until the first value can be read. In this case, the method may block shortly. If this is a problem, the calling thread can be interrupted.
If a scaled value is desired, consider using AnalogInput.read().
getVoltage in interface AnalogInputjava.lang.InterruptedException - The calling thread has been interrupted.
ConnectionLostException - The connection with the IOIO is lost.AnalogInput.read()public float getReference()
AnalogInputAnalogInput.read() values are scaled.
getReference in interface AnalogInputpublic void setValue(int value)
public float read()
throws java.lang.InterruptedException,
ConnectionLostException
AnalogInputIt typically takes a few milliseconds between when the instance is created and until the first value can be read. In this case, the method may block shortly. If this is a problem, the calling thread can be interrupted.
If an absolute value is desired, consider using AnalogInput.getVoltage().
read in interface AnalogInputjava.lang.InterruptedException - The calling thread has been interrupted.
ConnectionLostException - The connection with the IOIO is lost.AnalogInput.getVoltage()public void disconnected()
disconnected in class AbstractResourcepublic void close()
close in interface Closeableclose in class AbstractPin
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||