RoboJDETM v2.0

com.ridgesoft.intellibrain
Class IntelliBrainAnalogInput

java.lang.Object
  extended by com.ridgesoft.intellibrain.IntelliBrainPinPort
      extended by com.ridgesoft.intellibrain.IntelliBrainAnalogInput
All Implemented Interfaces:
AnalogInput, DigitalInput

public class IntelliBrainAnalogInput
extends IntelliBrainPinPort
implements AnalogInput

Class representing a single analog input pin. These pins may also be used as digital inputs. This class implements both the AnalogInput and the DigitalInput interfaces.


Method Summary
 int getMaximum()
          Gets the maximum possible value for this analog input.
 int sample()
          Samples this analog input.
 String toString()
          Samples the sensor and returns the integer value as a String.
 
Methods inherited from class com.ridgesoft.intellibrain.IntelliBrainPinPort
isSet, setPullUp
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait
 

Method Detail

getMaximum

public int getMaximum()
Gets the maximum possible value for this analog input.

The analog input range of the IntelliBrain robotics controller is 0 - 1023.

Specified by:
getMaximum in interface AnalogInput
Returns:
1023

sample

public int sample()
Samples this analog input.

Specified by:
sample in interface AnalogInput
Returns:
the current measurement of the analog input

toString

public String toString()
Samples the sensor and returns the integer value as a String.

Overrides:
toString in class Object
Returns:
String containing the integer value sampled from the input

RoboJDETM v2.0

Copyright (c) 2003-2009 RidgeSoft, LLC. All rights reserved.
www.ridgesoft.com