NXT_GetBatteryLevel
Returns the current battery level in milli volts
Contents
Syntax
voltage = NXT_GetBatteryLevel()
voltage = NXT_GetBatteryLevel(handle)
Description
voltage = NXT_GetBatteryLevel() returns the current battery level voltage of the NXT Brick in milli voltage.
voltage = NXT_GetBatteryLevel(handle) uses the given Bluetooth connection handle. This should be a serial handle on a PC system and a file handle on a Linux system.
If no Bluetooth handle is specified the default one (COM_GetDefaultNXT) is used.
Examples
voltage = NXT_GetBatteryLevel();
handle = COM_OpenNXT('bluetooth.ini');
voltage = NXT_GetBatteryLevel(handle);
See also
COM_GetDefaultNXT, NXT_SendKeepAlive,
Signature
- Author: Linus Atorf (see AUTHORS)
- Date: 2007/10/15
- Copyright: 2007-2010, RWTH Aachen University