NXT Battery and Power Control
From ROBOTC API Guide
NXT → Functions and Variables → Battery and Power Control
|
The NXT firmware keeps track of the minutes of inactivity on a NXT. When this exceeds a configurable limit, then the NXT will automatically power off. Inactivity is defined as time without a user keypress. The inactivity timeout value can be set via the NXT GUI. It can also be set via editing ROBOTC property pages. Whenever ROBOTC makes a connection to a NXT it will set the timeout value to the value from the property page configuration. Note that the NXT can behave unpredictably at low voltages and when trying to write to flash memory. So whenever ROBOTC attempts a connection between PC and NXT, it checks the battery voltage. If the voltage is too low for reliable operation, the ROBOTC connection will be aborted. |
|
| |||||||
alive
| void alive() | |
| (void) Periodically calling this function will reset the timer used to put the controller to sleep after long periods of inactivity. | |
|
powerOff
| void powerOff() | |
| (void) Immediately powers off the controller. | |
|
bNoPowerDownOnACAdaptor
| bool bNoPowerDownOnACAdaptor | |
| (bool) A flag to tell the NXT not to power down if it is connected to an AC power source. True = will NOT power down, False = WILL power down. | |
|
bNxtRechargable
| bool bNxtRechargable | |
| (bool) Boolean variable. Indicates whether the NXT is currently using a rechargable battery pack. | |
|
LowVoltageBatteryCountLimits
| int LowVoltageBatteryCountLimits | |
| (int) The NXT will generate a "low voltage" pop up on the display when a specified amount of consecutive battery voltage samples are at a low voltage. Set this variable to the amount you wish, where 0 disabes the pop up entirely. | |
|
nAvgBatteryLevel
| int nAvgBatteryLevel | |
| (int) The average battery level in millivolts. (A value of 9458 represent 9.458 volts.) It's the average of 20 recent samples and smoothes out sudden voltage transients. | |
|
nImmediateBatteryLevel
| int nImmediateBatteryLevel | |
| (int) The last sampled battery level in millivolts. (A value of 9458 represent 9.458 volts.) | |
|
nPowerDownDelayMinutes
| int nPowerDownDelayMinutes | |
| (int) Specifies the number of minutes of inactivity (i.e. no buttons pressed) used by the sleep timer for automatic power off of controller. The controller automatically powers off to conserve battery power. | |
|
nPowerDownDelayMinutesDefault
| int nPowerDownDelayMinutesDefault | |
| (int) The default number of minutes of inactivity used by the sleep timer for automatic power off of controller. | |
|