nanovm.nibo.drivers
Class LineDetector

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

public class LineDetector
extends java.lang.Object

Encapsulates the information about the two IR-reflex-sensors for line 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
LineDetector()
           
 
Method Summary
static int getLeftAbs()
          Get the measured value from the left line sensor with IR-enlightment.
static int getLeftRel()
          Get the difference between the measurement with and without IR-enlightment from the left line sensor.
static int getRightAbs()
          Get the measured value from the right line sensor with IR-enlightment.
static int getRightRel()
          Get the difference between the measurement with and without IR-enlightment from the right line 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

LineDetector

public LineDetector()
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 line sensor.

Returns:
measured value

getRightRel

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

Returns:
measured value

getLeftAbs

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

Returns:
measured value

getRightAbs

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

Returns:
measured value