Skip to content
This repository was archived by the owner on Feb 10, 2022. It is now read-only.
This repository was archived by the owner on Feb 10, 2022. It is now read-only.

OUTPUT pins also initialize as INPUT pins #25

Open
@cchamikara

Description

@cchamikara

I found that output pins also set as input pins by init_gpio() function , so I did modify below lines to get it work

        if pin not in GPIO_OUTPUT_PINS:
            logging.debug("Initialising GPIO input pin %d..." % (pin))
            if MONITOR_PINS_PUD == "UP":
                GPIO.setup(pin, GPIO.IN, pull_up_down=GPIO.PUD_UP)
            elif MONITOR_PINS_PUD == "DOWN":
                GPIO.setup(pin, GPIO.IN, pull_up_down=GPIO.PUD_DOWN)
            else:
                GPIO.setup(pin, GPIO.IN)
        else:
            logging.debug("Initialising GPIO output pin %d..." % (pin))
            GPIO.setup(pin, GPIO.OUT)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions