Iām not familiar with the Onion Omega 2+ myself but might be able to help out if you have access to a REPL, with all of the dependencies installed and running the code:
import os, datetime, time
from OmegaExpansion import oledExp
from subprocess import Popen, PIPE
# find current time
currentTime = datetime.datetime.now()
# measure and format battery voltage
program = Popen("power-dock2", stdin=PIPE, stdout=PIPE, stderr=PIPE)
output, err = program.communicate()
Then using a REPL to print: print(output)
Let us know how you go!
Liam.
1 Like
And you can get our latest projects and tips straight away by following us on: