You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Blazes-MacBook-Pro:v2020.0 blazesanders$ python3 Driver.py
DEBUG STATEMENTS ARE ON INSIDE Actuator.py CLASS
Actuator.py MESSAGE: WARNING: You are running code on Mac or PC (NOT a Raspberry Pi 4), thus hardware control is not possible.
DEBUG STATEMENTS ARE ON INSIDE Try/Catch ImportError in LASER.py CLASS
Try/Catch ImportError in LASER.py MESSAGE: WARNING - You are running code on Mac or PC (NOT a Raspberry Pi 4), thus hardware control is not possible.
DEBUG STATEMENTS ARE ON INSIDE Driver.py CLASS
DEBUG STATEMENTS ARE ON INSIDE Actuator.py CLASS
Traceback (most recent call last):
File "Driver.py", line 414, in
fluidActuatorList = [Actuator('R', RUM_PUMP, rumFlavorPins, "Rum Flavor Motor: Zjchao 202", Actuator.CW)]
File "/Users/blazesanders/Tapomatic/v2020.0/Actuator.py", line 143, in init
tempServoObject = Servo(pins[0]) #TODO REMOVE BECAUSE TO SIMPLE AN OBJECT
NameError: name 'Servo' is not defined
The text was updated successfully, but these errors were encountered:
OpenSourceIronman
changed the title
gpiozero.Servo() import or usage error???
gpiozero.Servo() and OutputDevice(8) import or usage error???
Jul 12, 2020
pi@raspberrypi:~/Tapomatic/v2020.0 $ python3 Actuator.py
DEBUG STATEMENTS ARE ON INSIDE Actuator.py CLASS
Actuator.py MESSAGE: Try fail in main of Actuator.py
After changing the code to the following to get the output at bottom of this comment.
So what line is causing try fail?
Is "except NameError:" too vague and catching ALL exceptions?
283 try:
284 #Actuator.UnitTest()
285 #relay = OutputDevice(8) #BCM-8
286 #relay.on()
287 #time.sleep(20) # seconds or milliseconds?
288 #relay.off()
289 print("THIS CANT FAIL?")
290 v
291 currentProgramFilename = os.path.basename(file)
292 NameDebugObject = Debug(True, currentProgramFilename)
293 NameDebugObject.Dprint("Try fail in main of " + str(currentProgramFilename))
294
295 print("END ACTUATOR.PY MAIN")
END ACTUATOR.PY MAIN
pi@raspberrypi:~/Tapomatic/v2020.0 $ python3 Actuator.py
THIS CANT FAIL?
https://gpiozero.readthedocs.io/en/stable/api_output.html#servo
Blazes-MacBook-Pro:v2020.0 blazesanders$ python3 Driver.py
DEBUG STATEMENTS ARE ON INSIDE Actuator.py CLASS
Actuator.py MESSAGE: WARNING: You are running code on Mac or PC (NOT a Raspberry Pi 4), thus hardware control is not possible.
DEBUG STATEMENTS ARE ON INSIDE Try/Catch ImportError in LASER.py CLASS
Try/Catch ImportError in LASER.py MESSAGE: WARNING - You are running code on Mac or PC (NOT a Raspberry Pi 4), thus hardware control is not possible.
DEBUG STATEMENTS ARE ON INSIDE Driver.py CLASS
DEBUG STATEMENTS ARE ON INSIDE Actuator.py CLASS
Traceback (most recent call last):
File "Driver.py", line 414, in
fluidActuatorList = [Actuator('R', RUM_PUMP, rumFlavorPins, "Rum Flavor Motor: Zjchao 202", Actuator.CW)]
File "/Users/blazesanders/Tapomatic/v2020.0/Actuator.py", line 143, in init
tempServoObject = Servo(pins[0]) #TODO REMOVE BECAUSE TO SIMPLE AN OBJECT
NameError: name 'Servo' is not defined
The text was updated successfully, but these errors were encountered: