@felmue said in Core2 should turn off after USB is disconnected:
M5Core2
Good morning Felix,
thank you for your quick reply :-)
So I have to disassemble the device and can disconnect the battery I suppose...
That is of course obvious - I didn't think about it, silly me ;-)
My goal is - if possible - I would like to do a shutdown few seconds after disconnecting the USB to save all the data on the SD card in time and close the file.
Later, when the USB voltage is back, the device should boot again automatically
Is this possible?
May I ask you where to find more information about API or Power management?
Because m5.Axp.isACIN()
is not described at [https://docs.m5stack.com/en/api/core2/axp192_core2](link url) and also not in the source code AXP192.cpp
. So I can only guess what some functions will do...
Thanks again in advance for your help!