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

lejos.hardware.port.AnalogPort 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.hardware.port;

/**
 * An abstraction for a port that supports Analog/Digital sensors.
 * 
 * @author Lawrie Griffiths/Andy.
 * 
 */
public interface AnalogPort extends IOPort, BasicSensorPort {
    /**
     * return the voltage present on pin 6 of the sensor port
     * @return voltage reading
     */
	public float getPin6();
	
    /**
     * return the voltage present on pin 1 of the sensor port
     * @return voltage reading
     */
	public float getPin1();
	
	/**
	 * Return a series of results obtained from the sensor.
	 * This is currently only used for the NXT color sensor
	 * @param vals Place to store the values
	 * @param offset Offset into the above array to start storing
	 * @param length number of values to read
	 */
	public void getFloats(float [] vals, int offset, int length);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy