2020-02-07, 03:36 PM
(2020-02-07, 12:37 PM)Sailoog Wrote: buff I did not remember we had already done this
forget that script, that is for OP1 and pyhon2
For OP2 you have to install ina219 module for python3:
sudo pip3 install pi-ina219
Haha! No worries, happens to the best of us.
I am running 1.2.0 alpha, and installed both:
sudo pip install pi-ina219
sudo pip3 install pi-ina219
When trying the corresponding commands I get:
Python command:
Code:
pi@openplotter:~/.openplotter/tools/ina219 $ sudo python ina219.py
Traceback (most recent call last):
File "ina219.py", line 3, in <module>
from ina219 import INA219
File "/home/pi/.openplotter/tools/ina219/ina219.py", line 3, in <module>
from ina219 import INA219
ImportError: cannot import name INA219
Python3 command:
Code:
pi@openplotter:~/.openplotter/tools/ina219 $ python3 ina219.py
File "ina219.py", line 19
print home+'/.openplotter/openplotter_analog.conf'
^
SyntaxError: Missing parentheses in call to 'print'
Can I still make it work in 1.2.0. alpha? I can't upgrade that easily to 2. Have it running on a Pi 4 with 4GB to test, but my main system is still 1.2.0 for a while.
Hope you can help!