nanovm.nibo.drivers
Class EdgeDetector

java.lang.Object
  extended by nanovm.nibo.drivers.EdgeDetector

public class EdgeDetector
extends java.lang.Object

Encapsulates the information about the two IR-reflex-sensors for edge detection. You will have to call the update Method first to get actual values.


Field Summary
static int MAXIMUM
          Maximum value from IR-sensor
static int MINIMUM
          Minimum value from IR-sensor
 
Constructor Summary
EdgeDetector()
           
 
Method Summary
static int getLeftAbs()
          Get the measured value from the left sensor with IR-enlightment.
static int getLeftRel()
          Get the difference between the measurement with and without IR-enlightment from the left sensor.
static int getRightAbs()
          Get the measured value from the right sensor with IR-enlightment.
static int getRightRel()
          Get the difference between the measurement with and without IR-enlightment from the right sensor.
static void update()
          Measure the reflex values on both sides and update the values.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAXIMUM

public static final int MAXIMUM
Maximum value from IR-sensor

See Also:
Constant Field Values

MINIMUM

public static final int MINIMUM
Minimum value from IR-sensor

See Also:
Constant Field Values
Constructor Detail

EdgeDetector

public EdgeDetector()
Method Detail

update

public static void update()
Measure the reflex values on both sides and update the values.


getLeftRel

public static int getLeftRel()
Get the difference between the measurement with and without IR-enlightment from the left sensor.

Returns:
measured value

getRightRel

public static int getRightRel()
Get the difference between the measurement with and without IR-enlightment from the right sensor.

Returns:
measured value

getLeftAbs

public static int getLeftAbs()
Get the measured value from the left sensor with IR-enlightment.

Returns:
measured value

getRightAbs

public static int getRightAbs()
Get the measured value from the right sensor with IR-enlightment.

Returns:
measured value