pt.citar.diablu.nxt.brick
Class NXTProximitySensor

java.lang.Object
  extended by pt.citar.diablu.nxt.brick.NXTComponent
      extended by pt.citar.diablu.nxt.brick.NXTProximitySensor

public class NXTProximitySensor
extends NXTComponent

The NXTProximitySensor class represents the ultrasonic sensor...

Author:
Jorge Cardoso

Constructor Summary
NXTProximitySensor(NXTBrick brick, byte portAttached)
          Coonstructs a new NXTProximitySensor object given the NXTBrick and the port number the sensor is connected to.
 
Method Summary
 int getDistance()
           
 void initialize()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NXTProximitySensor

public NXTProximitySensor(NXTBrick brick,
                          byte portAttached)
Coonstructs a new NXTProximitySensor object given the NXTBrick and the port number the sensor is connected to.

Parameters:
brick - The NXTBrick.
portAttached - The port to which the sensor is attached. (0 - 3).
Method Detail

initialize

public void initialize()

getDistance

public int getDistance()


Processing library NXTComm by Jorge C. S. Cardoso. (c) 2014