All Downloads are FREE. Search and download functionalities are using the official Maven repository.

lejos.remote.nxt.InputValues Maven / Gradle / Ivy

Go to download

leJOS (pronounced like the Spanish word "lejos" for "far") is a tiny Java Virtual Machine. In 2013 it was ported to the LEGO EV3 brick.

The newest version!
package lejos.remote.nxt;

/**
 * Sensor input values for a remote NXT accessed via LCP.
 * 
 * @author Brian Bagnall
 * 
 */
public class InputValues {
	public int inputPort;
	/**
	 * NXT indicates if it thinks the data is valid
	 */
	public boolean valid = true;
	public boolean isCalibrated;
	public int sensorType;
	public int sensorMode;
	/**
	 * The raw value from the Analog to Digital (AD) converter.
	 */
	public int rawADValue;
	/**
	 * The normalized value from the Analog to Digital (AD) converter. I really don't
	 * know for sure which values are normalized yet.
	 * 0 to 1023
	 */
	public int normalizedADValue;
	/**
	 * The scaled value starts working after the first call to the sensor.
	 * The first value will be the raw value, but after that it produces scaled values.
	 * With the touch sensor, off scales to 0 and on scales to 1.
	 */
	public short scaledValue;
	/**
	 * Currently unused.
	 */
	public short calibratedValue;
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy