NXT Energy Meter

../_images/nxtdevice-energy.png
class EnergyMeter(port)

LEGO® MINDSTORMS® Education NXT Energy Meter.

Parameters:

port (Port) – Port to which the sensor is connected.

await storage() int: J

Gets the total available energy stored in the battery.

Returns:

Remaining stored energy.

await input() tuple[int, int, int]

Measures the electrical signals at the input (bottom) side of the energy meter. It measures the voltage applied to it and the current passing through it. The product of these two values is power. This power value is the rate at which the stored energy increases. This power is supplied by an energy source such as the provided solar panel or an externally driven motor.

Returns:

Voltage (mV), current (mA), and power (mW) measured at the input port.

await output() tuple[int, int, int]

Measures the electrical signals at the output (top) side of the energy meter. It measures the voltage applied to the external load and the current passing to it. The product of these two values is power. This power value is the rate at which the stored energy decreases. This power is consumed by the load, such as a light or a motor.

Returns:

Voltage (mV), current (mA), and power (mW) measured at the output port.