Last active
January 15, 2023 11:57
-
-
Save 0x4c756e61/56b39d9626e412346e6a9c71a1376b3e to your computer and use it in GitHub Desktop.
Numwors Battery test script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ion | |
import time | |
def work(): | |
start = time.monotonic() | |
while (time.monotonic() - start < 30): | |
_ = 9999**9999 | |
f = open("bat.py", "w") | |
while ion.battery_level() != 0: | |
work() | |
v = ion.battery() | |
vStr = str(v)[:4] | |
print(vStr) | |
f.write(vStr + ',') | |
work() | |
f.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment