Should work if you replace line
volt = axp.getBatVoltage()
volt = power.getBatVoltage()
Battery discharge characteristics should be the same +/- some small variations independently of battery capacity.
I found table with voltage and according percentage on internet and make this code
ewentually you could calculate with formula something like this, but it is not accurate.
percentage = int( (battery_voltage - 3.20) * 100)
If you work with uiflow you can add second module in add unit section, then you select custom port and enter pins which you will use. But you must connect it to other avialable pins at bottom of atom. You must also know what pins may work as input for ECHO signal (not all can do). Later you place block from units - distance and select which sensor you would use ultrasonic1 or ultrasonic 2.
You can try this:
But this may not work properly with all modules included in micropython firmware. You need also micropython version 1.14.
@robalstona what do you mean by "check when the power button is pressed to power on device" ?
I mean that this axp192 chip is always powered and waits for power button press to powering upthe esp32 chip and lcd with backligth. And check when this button is pressed for 6 seconds to shut down the power.
In this case the problem is a AXP192 power management chip which consumes whole time ~2mA. This chip is connected to internal battery and power builtin microphone, lcd and other devices. Also check when the power button is pressed to power on device.
the problem is probably that the parser of the uiflow editor treats the \ character as a special character and prefixes it with another character in order to display it. The effect of this is that only one character should be displayed. The problem is that after this character is encountered, the rest of the character is not taken into account. You can work around this problem by using the Execute code: block and enter the code directly
myVar = 'text\n'
When was repaired bug with dissapearing wirtual keyboard on mobile browsers?
Hello, what do you mean specifically? A ready-made local weather station or access to commercial weather stations. If you mean the latter, I did access accuweather on m5stickc in uiflow.