Unable to Open Phidget

Comments & issues
Supporting Windows 8 or newer
LawrenceByers
Fresh meat
Posts: 1
Joined: Tue May 06, 2025 3:40 am

Unable to Open Phidget

Post by LawrenceByers »

I’m having an issue trying to connect and use the Phidget 1048 (temperature and humidity sensor module) with Python. Below is the code I’m using:

Code: Select all

from Phidget22.Phidget import *
from Phidget22.Devices.VoltageInput import *

try:
    sensor = VoltageInput()
    sensor.setDeviceSerialNumber(123456)
    sensor.openWaitForAttachment(5000)
    print("Phidget 1048 successfully connected.")
except Exception as e:
    print(f"Error: {str(e)}")
However, I’m getting the following error message:

Code: Select all

Error: Unable to open Phidget.
I’ve double-checked the USB connection and verified that the Phidget drivers are correctly installed, but I’m still unable to establish a connection.

Has anyone encountered this issue before, or is there a solution to resolve this error?
User avatar
mparadis
Site Admin
Posts: 677
Joined: Fri Oct 28, 2011 12:17 pm

Re: Unable to Open Phidget

Post by mparadis »

The serial number in the code sample should match the number for your device. The number #1234567 is just a placeholder in the example.