Skip to content

Instantly share code, notes, and snippets.

@0x4c756e61
Last active January 15, 2023 11:57
Show Gist options
  • Save 0x4c756e61/56b39d9626e412346e6a9c71a1376b3e to your computer and use it in GitHub Desktop.
Save 0x4c756e61/56b39d9626e412346e6a9c71a1376b3e to your computer and use it in GitHub Desktop.
Numwors Battery test script
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