public class GP2Y0A21YK extends AnalogInputDevice implements DistanceSensorInterface
listeners
pinNumber
Constructor and Description |
---|
GP2Y0A21YK(AnalogInputDeviceFactoryInterface deviceFactory,
int pinNumber) |
GP2Y0A21YK(int pinNumber) |
Modifier and Type | Method and Description |
---|---|
float |
getDistanceCm() |
float |
getScaledValue()
Get the scaled value in the range 0..range (if unsigned) or -range..range (if signed)
|
addListener, addListener, close, disableListener, enableListener, getUnscaledValue, run
addListener, removeAllListeners, removeListener, valueChanged
getPinNumber
public GP2Y0A21YK(int pinNumber) throws RuntimeIOException
RuntimeIOException
public GP2Y0A21YK(AnalogInputDeviceFactoryInterface deviceFactory, int pinNumber) throws RuntimeIOException
RuntimeIOException
public float getScaledValue() throws RuntimeIOException
AnalogInputDevice
getScaledValue
in class AnalogInputDevice
RuntimeIOException
- if there was an I/O errorpublic float getDistanceCm() throws RuntimeIOException
getDistanceCm
in interface DistanceSensorInterface
RuntimeIOException
Copyright © 2016 mattjlewis. All rights reserved.