# purchase a VINT HUB from
#
https://www.phidgets.com/?tier=3&catid= ... prodid=643
# and
# purchase a Signal Relay Phidget from
#
https://www.phidgets.com/?tier=3&catid= ... prodid=723
# plug the VINT HUB into your computer's USB port
# and the Signal Relay Phidget into the VINT HUB
# paste the code below into Python and run it.
# BAM! Flashing device! (light, strobe, horn, etc.)
from Phidget22.Phidget import *
from Phidget22.Devices.DigitalOutput import *
import time
digitalOutput0 = DigitalOutput()
digitalOutput0.setIsHubPortDevice(True)
digitalOutput0.setHubPort(0)
digitalOutput0.openWaitForAttachment(5000)
while (1):
digitalOutput0.setDutyCycle(1)
time.sleep(.15) # .15 seconds ON
digitalOutput0.setDutyCycle(0)
time.sleep(1) # 1.0 seconds OFF
digitalOutput0.close()
# press CTRL+C to end program
# This code was mostly generated by
# Phidgets online Code Samples Generator - TOO EASY!
#
https://www.phidgets.com/?tier=3&catid= ... prodid=723