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

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

public class Battery {
	private static Power power = BrickFinder.getDefault().getPower();

	public static int getVoltageMilliVolt() {
		return power.getVoltageMilliVolt();
	}

	public static float getVoltage() {
		return power.getVoltage();
	}

	public static float getBatteryCurrent() {
		return power.getBatteryCurrent();
	}

	public static float getMotorCurrent() {
		return power.getMotorCurrent();
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy