Troubleshooting

Gravity: I2C Digital Wattmeter

userHead Account cancelled 2022-03-21 19:47:18 722 Views2 Replies
Having so many problems getting this to work on a Raspberry PI.

1. The URL https://wiki.dfrobot.com/Gravity%3A%20I2C%20Digital%20Wattmeter%20SKU%3A%20SEN0291#target_6 has a link in the Raspberry Pi Tutorial to github that is wrong - it takes you to AS3935

2. But instead if I follow the instructions further down it has the correct link - so it suggests to
[email protected]:~ $ git clone https://github.com/DFRobot/DFRobot_INA219.git

Which works.... but the remaining instructions dont work....
[email protected]: $ cd ~/DFRobot_INA219/RaspberryPi/Python/example
[email protected]:~/DFRobot_INA219/RaspberryPi/Python/example $ python getVoltageCurrentPower.py

Because the directory structure has now changed... and someone can not spell Raspberry and decided to use a directory called Respberry

3. So I have got past all of this but I am still having problems....
If I run the example within the sample directory - it works fine... If I try to run the same code in a different directory, it does not work as it cannot find the library....

ie.
[email protected]:~/DFRobot_INA219/Python/RespberryPi/examples/get_voltage_current_power $ python get_voltage_current_power.py
Shunt Voltage : 136.00 mV
Bus Voltage : 5.077 V
Current : 136 mA
Power : 680 mW

(NOTE the new file structure and mis spelling - LOL)

SO same program in a different directory;
[email protected]:~/WaterTankLevel $ python get_voltage_current_power.py
Traceback (most recent call last):
File "get_voltage_current_power.py", line 16, in <module>
from DFRobot_INA219 import INA219
ImportError: No module named DFRobot_INA219

It appears the libraries are not getting installed to somewhere in the path / lib - so where should they be and how do i get them there !!!

Quality Assurance and Testing before releasing - eh!
2022-03-22 03:42:42 And what else can anyone tell me about this? userHeadPic s.mullep2022
2022-03-22 03:39:45 interesting userHeadPic s.mullep2022