We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d7e49d0 commit 7797468Copy full SHA for 7797468
internal_filesystem/apps/com.micropythonos.showbattery/assets/hello.py
@@ -1,13 +1,4 @@
1
"""
2
-8:44 4.15V
3
-8:46 4.13V
4
-
5
-import time
6
-v = mpos.battery_voltage.read_battery_voltage()
7
-percent = mpos.battery_voltage.get_battery_percentage()
8
-text = f"{time.localtime()}: {v}V is {percent}%"
9
-text
10
11
from machine import ADC, Pin # do this inside the try because it will fail on desktop
12
adc = ADC(Pin(13))
13
# Set ADC to 11dB attenuation for 0–3.3V range (common for ESP32)
0 commit comments