-
CommentStreams:78fd74fb28f5637f70fdebf96f31ed50
Jump to navigation
Jump to search
Hi, RPi4/4GB, all updates & upgrades; cloned and installed files from Git this morning (20220317). Blue button only works to force shutdown (>8 seconds press), and when I run the battery monitor script (I moved it to a "Scripts" directory in my Pi/Home), I get this error:
pi@raspberrypi:~ $ sudo python /home/pi/Scripts/x728bat.py
/home/pi/Scripts/x728bat.py:14: RuntimeWarning: This channel is already in use, continuing anyway. Use GPIO.setwarnings(False) to disable warnings.
GPIO.setup(GPIO_PORT, GPIO.OUT)
Traceback (most recent call last):
File "/home/pi/Scripts/x728bat.py", line 38, in <module>
print ("Voltage:%5.2fV" % readVoltage(bus))
File "/home/pi/Scripts/x728bat.py", line 20, in readVoltage
read = bus.read_word_data(address, 2)
TimeoutError: [Errno 110] Connection timed out pi@raspberrypi:~ $
I have uninstalled and re-installed the files twice. The x728off and x728pld.py commands work - but not the battery level. Any help?