Changes

Jump to navigation Jump to search

X708

754 bytes removed, 10:10, 26 November 2021
[[File:18650_battery_size-2.jpg|400px]]
 
 
Q2: We want automatic shutdown when the external AC power supply is disconnected, is possible?
 
A: Yes. you can program a script to get this function. Example (The following is a pseudo code):
<pre>
 
while (1) {
// invoke the API to get AC PSU status: connected or disconnected
int disconnected_flag = getACPSUStatus(); // please refer to the user manual to achieve getACPSUStatus function;
int battery_voltage = getBatteryVoltage(); // please refer to the user manual to achieve getBatteryVoltage function;
// You can make your own actions based on disconnected_flag and battery_voltage, you can only select one condition also
if (disconnected_flag) {
// execute linux or software shutdown command
}
 
sleep(10);
}
 
</pre>

Navigation menu