I want to connect a PhidgetInterfaceKit 0/0/4 (4 relays) via USB to a raspberry pi3.
I want to drive the 4 relays with a python program.
Here is what i've done:
$ wget http://www.phidgets.com/downloads/libra ... Python.zip
(I've unzip and changed directory)
$ sudo python setup.py install
At this point, everything is okay, i have no error message.
Here is my very basic python program:
Code: Select all
from Phidget22.Devices.DigitalOutput import *
from Phidget22.Phidget import *
ch = DigitalOutput()
ch.openWaitForAttachment(5000)
ch.close()
Code: Select all
Traceback (most recent call last):
File "test3.py", line 4, in <module>
ch = DigitalOutput()
File "/usr/local/lib/python2.7/dist-packages/Phidget22/Devices/DigitalOutput.py", line 28, in __init__
__func = PhidgetSupport.getDll().PhidgetDigitalOutput_create
File "/usr/local/lib/python2.7/dist-packages/Phidget22/PhidgetSupport.py", line 17, in getDll
PhidgetSupport.__dll = cdll.LoadLibrary("libphidget22.so.0.0.0")
File "/usr/lib/python2.7/ctypes/__init__.py", line 440, in LoadLibrary
return self._dlltype(name)
File "/usr/lib/python2.7/ctypes/__init__.py", line 362, in __init__
self._handle = _dlopen(self._name, mode)
OSError: libphidget22.so.0.0.0: cannot open shared object file: No such file or directory
Exception OSError: OSError('libphidget22.so.0.0.0: cannot open shared object file: No such file or directory',) in <bound method DigitalOutput.__del__ of <Phidget22.Devices.DigitalOutput.DigitalOutput instance at 0x76bb3f08>> ignored
I have successfully compiled and installed this library on my raspberry
http://www.phidgets.com/downloads/libra ... get.tar.gz
But this library contains a different version: libphidget21.so
So i do not know what to do.
Thanks