Flashing a device by using Phidgets

Supporting 2.6 and up
Post Reply
akwa
Fresh meat
Posts: 3
Joined: Fri Feb 21, 2020 7:16 am
Contact:

Flashing a device by using Phidgets

Post by akwa »

Is it possible to flash a device by using Phidgets? I think I should use a 4x Relay Phidget to do this. But I don't know how to start.. I'm kinda bad at programming. I was planning to use Python for this.
User avatar
mparadis
Site Admin
Posts: 959
Joined: Fri Oct 28, 2011 12:17 pm
Contact:

Re: Flashing a device by using Phidgets

Post by mparadis »

I doubt a Phidget digital output would be fast enough to simulate the kind of signal needed to flash a device. You'd also have to custom program all of the logic behind creating the signal, which would be a lot of work. In most cases, any device that can be flashed typically has a specialized utility available that makes flashing easy.
jdecoux
Labview Developer
Posts: 161
Joined: Mon Nov 13, 2017 10:20 am
Contact:

Re: Flashing a device by using Phidgets

Post by jdecoux »

Unless you mean flashing a light? That would be quite easy.
sumware
Fresh meat
Posts: 1
Joined: Tue Sep 10, 2019 11:32 am
Contact:

Re: Flashing a device by using Phidgets

Post by sumware »

# 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
Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests