interfaceKit

Supporting 2.7 and 3.2+
Post Reply
zdm11
Fresh meat
Posts: 4
Joined: Mon Jul 24, 2017 5:05 pm
Contact:

interfaceKit

Post by zdm11 »

Need for help! :?:
Description:
I'm trying to get a voltage signal of a RH sensor from a phidget 1018 board by using the statement interfaceKit.getSensorValue(), but the IDLE says "NameError: name 'interfaceKit' is not defined". I did install phidget22 library manually. So I thought the reason was I don't have interfaceKit module. As I call "from Phidgets.Devices.InterfaceKit import *" at the beginning of the code, IDLE said "ModuleNotFoundError: No module named 'Phidget22.Devices.InterfaceKit'". However, I can't find any installable library of the interfaceKit.
So my question is: Am I going to a wrong direction? Or there is something wrong with my library? Please help. Thank you very much!
User avatar
mparadis
Site Admin
Posts: 660
Joined: Fri Oct 28, 2011 12:17 pm
Contact:

Re: interfaceKit

Post by mparadis »

InterfaceKit is a Phidget21 object. If you're using Phidget22, you should use the VoltageInput or VoltageRatioInput object to represent the channel your sensor is connected to (see the API and select 1018_2 for a full list of methods for these objects). Once you've opened one of these channels you can get the voltage and convert it into the proper units using the formula given in the sensor's datasheet.
zdm11
Fresh meat
Posts: 4
Joined: Mon Jul 24, 2017 5:05 pm
Contact:

Re: interfaceKit

Post by zdm11 »

mparadis wrote:InterfaceKit is a Phidget21 object. If you're using Phidget22, you should use the VoltageInput or VoltageRatioInput object to represent the channel your sensor is connected to (see the API and select 1018_2 for a full list of methods for these objects). Once you've opened one of these channels you can get the voltage and convert it into the proper units using the formula given in the sensor's datasheet.
Thank you very much!
However, I still cannot pass the voltage signal value to x by the statement of x = getSensorValue(). It said
Could you just show me how to do it? I do have "from Phidget22.Devices.VoltageInput import *" at the beginning!
it will be great helpful! thank you!
User avatar
mparadis
Site Admin
Posts: 660
Joined: Fri Oct 28, 2011 12:17 pm
Contact:

Re: interfaceKit

Post by mparadis »

I recommend having a look at our Python example code. Use the VoltageInput example, which uses event handlers to gather data rather than using getSensorValue (although getSensorValue should work if the channel is opened and attached properly).
zdm11
Fresh meat
Posts: 4
Joined: Mon Jul 24, 2017 5:05 pm
Contact:

Re: interfaceKit

Post by zdm11 »

mparadis wrote:I recommend having a look at our Python example code. Use the VoltageInput example, which uses event handlers to gather data rather than using getSensorValue (although getSensorValue should work if the channel is opened and attached properly).
Got it! :D Thank you for your time!
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest