M5Unified
M5Unified copied to clipboard
StickCP2.Power.getBatteryVoltage() and analogRead() conflict
I am using a M5StickC Plus2 with unit watering, and I want to monitor the battery level and the soil senor, but reading one seems to break the other.
For example:
StickCP2.Power.getBatteryVoltage(); // returns 4228
analogRead(33); // returns 0
analogRead(33); // returns 1770
StickCP2.Power.getBatteryVoltage(); // returns 0
This works fine
analogRead(33); // returns 1770
analogRead(38); // returns 2430