M5StickCP2: isCharging inf Power class does not function
-
Hi all,
I'm trying to detect when M5StickC2+ is connected to power. I'm using the function StickCP2.Power.isCharging() to do so. However the function always return value 2 (charge_unknown) no matter if the M5Stick is connected to power or not. Is there an alternate way to detect power connected?
Thanks! -
Hello @oody1
the charger IC (TP4057) in M5StickCPlus2 cannot be queried by software about whether the battery is getting charged or not. It only has two outputs (CHRG and STDBY), but they are not connected. See schematic here. That is the reason the isCharging() function can only return charge_unknown. See here.
And no, I am not aware of a way to figure out whether M5StickCPlus2 is connected to external power or not.
Thanks
Felix -
Thanks @felmue !