Package lejos.remote.nxt
Class RemoteNXTBattery
- java.lang.Object
-
- lejos.remote.nxt.RemoteNXTBattery
-
- All Implemented Interfaces:
Power,NXTProtocol
public class RemoteNXTBattery extends java.lang.Object implements Power, NXTProtocol
Battery readings from a remote NXT.
-
-
Field Summary
-
Fields inherited from interface lejos.remote.nxt.NXTProtocol
ANGLE, ANGLESTEPSMODE, BOOLEANMODE, BOOT, BRAKE, CELSIUSMODE, CLOSE, CUSTOM, DELETE, DELETE_USER_FLASH, DIRECT_COMMAND_NOREPLY, DIRECT_COMMAND_REPLY, FAHRENHEITMODE, FIND_FIRST, FIND_NEXT, GET_BATTERY_LEVEL, GET_CURRENT_PROGRAM_NAME, GET_DEVICE_INFO, GET_FIRMWARE_VERSION, GET_INPUT_VALUES, GET_OUTPUT_STATE, HIGH_SPEED_BUFFER, KEEP_ALIVE, LIGHT_ACTIVE, LIGHT_INACTIVE, LOWSPEED, LOWSPEED_9V, LS_GET_STATUS, LS_READ, LS_WRITE, MESSAGE_READ, MESSAGE_WRITE, MODEMASK, MOTOR_RUN_STATE_IDLE, MOTOR_RUN_STATE_RAMPDOWN, MOTOR_RUN_STATE_RAMPUP, MOTOR_RUN_STATE_RUNNING, MOTORON, NO_OF_SENSOR_TYPES, NO_SENSOR, NXJ_DEFRAG, NXJ_DISCONNECT, NXJ_GET_AUTO_RUN, NXJ_GET_DEFAULT_PROGRAM, NXJ_GET_KEY_CLICK_VOLUME, NXJ_GET_SLEEP_TIME, NXJ_GET_VERSION, NXJ_GET_VOLUME, NXJ_PACKET_MODE, NXJ_SET_AUTO_RUN, NXJ_SET_DEFAULT_PROGRAM, NXJ_SET_KEY_CLICK_VOLUME, NXJ_SET_SLEEP_TIME, NXJ_SET_VOLUME, OPEN_APPEND_DATA, OPEN_READ, OPEN_READ_LINEAR, OPEN_WRITE, OPEN_WRITE_DATA, OPEN_WRITE_LINEAR, PCTFULLSCALEMODE, PERIODCOUNTERMODE, PLAY_SOUND_FILE, PLAY_TONE, POLL, POLL_BUFFER, POLL_LENGTH, RAWMODE, READ, REFLECTION, REGULATED, REGULATION_MODE_IDLE, REGULATION_MODE_MOTOR_SPEED, REGULATION_MODE_MOTOR_SYNC, REPLY_COMMAND, RESET_MOTOR_POSITION, RESET_SCALED_INPUT_VALUE, SET_BRICK_NAME, SET_INPUT_MODE, SET_OUTPUT_STATE, SLOPEMASK, SOUND_DB, SOUND_DBA, START_PROGRAM, STOP_PROGRAM, STOP_SOUND_PLAYBACK, SWITCH, SYSTEM_COMMAND_NOREPLY, SYSTEM_COMMAND_REPLY, TEMPERATURE, TRANSITIONCNTMODE, WRITE
-
-
Constructor Summary
Constructors Constructor Description RemoteNXTBattery(NXTCommand nxtCommand)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description floatgetBatteryCurrent()Return the current draw from the batteryfloatgetMotorCurrent()return the motor current drawfloatgetVoltage()The NXT uses 6 batteries of 1.5 V each.intgetVoltageMilliVolt()The NXT uses 6 batteries of 1500 mV each.
-
-
-
Constructor Detail
-
RemoteNXTBattery
public RemoteNXTBattery(NXTCommand nxtCommand)
-
-
Method Detail
-
getVoltageMilliVolt
public int getVoltageMilliVolt()
The NXT uses 6 batteries of 1500 mV each.- Specified by:
getVoltageMilliVoltin interfacePower- Returns:
- Battery voltage in mV. ~9000 = full.
-
getVoltage
public float getVoltage()
The NXT uses 6 batteries of 1.5 V each.- Specified by:
getVoltagein interfacePower- Returns:
- Battery voltage in Volt. ~9V = full.
-
getBatteryCurrent
public float getBatteryCurrent()
Description copied from interface:PowerReturn the current draw from the battery- Specified by:
getBatteryCurrentin interfacePower- Returns:
- current in Amps
-
getMotorCurrent
public float getMotorCurrent()
Description copied from interface:Powerreturn the motor current draw- Specified by:
getMotorCurrentin interfacePower- Returns:
- current in Amps
-
-