Name 'DigitalOutput' is not defined
Posted: Sat Feb 18, 2023 1:08 pm
Hi!
I was able to get a light sensor turning on the light in our carport working with a Phidget 0/16/16 board from a Raspberry Pi a while ago.
Now I wanted to expand things, reinstalled the libraries to be up-to-date and suddenly things don't work! Very annoying!
All installation parts seem to have gone well.
Here is the start of my Python code, which has worked well for a year or so:
from Phidget22.Phidget import *
from Phidget22.Devices.DigitalOutput import *
from Phidget22.Devices.DigitalInput import *
from Phidget22.Devices.Log import *
from Phidget22.LogLevel import *
from threading import Timer
import time
PhidgetSerialNumber = 346483;
phOutput = [DigitalOutput() for i in range (0, 16)]
But now I suddenly can't connect to this Phidget and Thonny shows an error in line 10: Name 'DigitalOutput' is not defined. I don't understand what has happened and how to solve this!
Any help much appreciated!
I was able to get a light sensor turning on the light in our carport working with a Phidget 0/16/16 board from a Raspberry Pi a while ago.
Now I wanted to expand things, reinstalled the libraries to be up-to-date and suddenly things don't work! Very annoying!
All installation parts seem to have gone well.
Here is the start of my Python code, which has worked well for a year or so:
from Phidget22.Phidget import *
from Phidget22.Devices.DigitalOutput import *
from Phidget22.Devices.DigitalInput import *
from Phidget22.Devices.Log import *
from Phidget22.LogLevel import *
from threading import Timer
import time
PhidgetSerialNumber = 346483;
phOutput = [DigitalOutput() for i in range (0, 16)]
But now I suddenly can't connect to this Phidget and Thonny shows an error in line 10: Name 'DigitalOutput' is not defined. I don't understand what has happened and how to solve this!
Any help much appreciated!