Load Cell:https://www.phidgets.com/?tier=3&catid= ... prodid=228
Phidget Bridge:https://www.phidgets.com/?tier=3&catid= ... rodid=1027
I using Windows so I've added the Phidget22Python library directory location to the enviroment variable as a PATH system variable. I'm trying
to run the code given on the Phidget website for the VoltageRatioInput API.
Code: Select all
import sys
import os
sys.path.append('C:\\Users\\abgupta\\Desktop\\PWC files\\Phidget\\libraries\\Phidget22Python')
from Phidget22.Phidget import *
from Phidget22.Devices.VoltageRatioInput import *
import time
def onVoltageRatioChange(self, voltageRatio):
print("VoltageRatio: " + str(voltageRatio))
def main():
voltageRatioInput0 = VoltageRatioInput()
voltageRatioInput0.setOnVoltageRatioChangeHandler(onVoltageRatioChange)
voltageRatioInput0.openWaitForAttachment(5000)
try:
input("Press Enter to Stop\n")
except (Exception, KeyboardInterrupt):
pass
voltageRatioInput0.close()
main()
FileNotFoundError: Could not find module 'phidget22.dll' (or one of its dependencies). Try using the full path with constructor syntax.
Do I have download any other module that contains phidget22.dll? Or did I miss any steps?
PS I did not connect the phidget bridge while running this code.
Thanks!