I post it here
Now Battery Coulombs are calculated correctly.
According to datasheet IP5306 charging current is 1.8A.
Battery, used in M5 Core Bottom is 300mAh.
It means that charge current is 6(!) times greater than C/10.
Only special designed batteries could work with such charge rate!
For me it is nothing surprizing that batteryes in M5 Core lives nothing.
For me is surprizing that no flammable incidents were reported yet.
What your designers were thinked about?!
Got 2 M5stack Core2 yesterday.
Spent 2 hours trying to understand M5 logic with versions mess.
Burned Core2 via M5Burner(2.1.6) with UIFlow Beta4-core2.
Download UIFlow-Desktop-IDE and choosed Beta, because there is no Core2 in v1.4.5.
CheckUpdate gives Current Version 1.0.12 on both 1.4.5 and Beta.
What is 1.0.12 for?
After connecting to Core2, IDE reccomend update Firmware to 1.6.3,
WEB IDE reccomend update Firmware to 1.6.4.
What are 1.6.3 and 1.6.4 Firmwares and where are them located?
This example illustrates how to get information from multiple SPAD areas from VL53L1X TOF sensor. 16 Regions Of Interest(ROI) with size of 4 * 4 SPAD elements each are defined in SPAD sensor array. Thus, a 4 * 4 measurement matrix formed. Distances measured from each of 16 ROI, interpolated to 8 * 8 image and displayed as Thermal like image.
Firstly I saw this amazing ST video
but they did not publish source code.
So, it was the challenge. After a shot time I realized the idea and made my own.
Now, similar design with WEMOS D1 mini Lite works as room light controller with no faults allready 3 days.
This example illustrates direction recognition with the single VL53L1X TOF sensor. Two Regions Of Interest(ROI) are defined in SPAD sensor array:
Data measurements distance0 and distance1 cyclically readed from both ROIs, switching them on the fly.
Then STM32duino_Proximity_Gesture library used for event interpretation.
To suit Arduino requirement I added necessary library description to Pololu vl53l1_api.
Also, to handle handMustCoverBoth parameter support in STM32duino_Proximity_Gesture library, I had to slightly modify tof_gestures_DIRSWIPE_1.cpp and tof_gestures_DIRSWIPE_1.h. Both libraries are included in this bundle.
Data outputs to serial @115200 and to OLED. For investigations and adjustments it is suitable to use SerialPlot: https://bitbucket.org/hyOzd/serialplot.
You should use exactly the libraries attached to project, as they were patched to suit classic gesture lib requirements and due to limited functionality of ESP32 Wire library. Also due this terrible Wire lib M5STACK works slower (42 Hz sample rate than to say ESP8266(72 Hz)).
I istalled release, but I guess I find another reason.
In the M5BALA stack there are three IP5306 IC on the 5V BUS.
And one of these IC is controlled by ESP32.
During reboot procedure trouble things occured at 5V bus Brownout
As (thanks to M5 team) we do not still have all fucking schematics, nobody could resolve what is going on there.
Now, the situation looks like the following: one time it could start working normally or another time it could not. Unpredictable.