Code: Select all
from Phidget22.PhidgetException import *
from Phidget22.Phidget import *
from Phidget22.Devices.TemperatureSensor import *
ch = TemperatureSensor()
ch.open()
tmp = ch.getTemperature()
print(tmp)
I'm using Geany to write this script and execute it. But all I get is:
- Traceback (most recent call last):
File "ProblemCode.py", line 8, in <module>
tmp = ch.getTemperature()
File "/usr/local/lib/python2.7/dist-packages/Phidget22/Devices/Tem
peratureSensor.py", line 186, in getTemperature
raise PhidgetException(result)
Phidget22.PhidgetException.PhidgetException