Page 1 of 1

Output Flickering After Second Use in Program

Posted: 23 Jul 2021, 04:56
by elboyoloco1080
I am using Python and the Revpimodio2 module on a project.
I have run into an issue where the first time my program turns on an output, the output works as expected.
When the program turns on the output a second time, the output flickers and turns off and on randomly the whole time it is supposed to be on. This behavior does not stop until I restart my program.
Again the first time the output goes HIGH, it looks fine. All times after this are bad.

Has anybody else experienced this? The program is making the same call to the revpi DIO each time. Why would it only happen after the first time?

Code that is called

Code: Select all

def bad_unlock_o1(self):
	"""Called from Entrant Controller."""
        # Switch on/off output O_1
        self.rpi.io.O_1.value = True
        print('RevPi Output 1 ON')
        time.sleep(unlockTime)
        self.rpi.io.O_1.value = False
        print('RevPi Output 1 OFF')

Re: Output Flickering After Second Use in Program

Posted: 28 Jul 2021, 22:40
by Steven
Maybe you have some loop in your code and you did not notice?
Or it is not software related? :ugeek:

What hardware module are you using?
What is connected to the output?
Maybe you have not enough AMPS on your powersupply?