Skip to content

OrangePi3B Problem #93

@Fushengyiri2

Description

@Fushengyiri2

I'm using OrangePi3B to set up the GPIO. The software doesn't report any errors, but here's the interesting thing, I can't control the actual level of the GPIO. How should I use this module?
here's my code:
`import OPi.GPIO as GPIO
import time

LED_RED = 11
LED_GREEN = 13
LED_BLUE = 15

GPIO.setmode(GPIO.BOARD)
GPIO.setup(LED_RED, GPIO.OUT)
GPIO.setup(LED_GREEN, GPIO.OUT)
GPIO.setup(LED_BLUE, GPIO.OUT)

GPIO.output(LED_RED, GPIO.LOW)
GPIO.output(LED_GREEN, GPIO.LOW)
GPIO.output(LED_BLUE, GPIO.LOW)

try:
print("running")

while True:
    # rad
    GPIO.output(LED_RED, GPIO.HIGH)
    time.sleep(1)
    GPIO.output(LED_RED, GPIO.LOW)
    
    # green
    GPIO.output(LED_GREEN, GPIO.HIGH)
    time.sleep(1)
    GPIO.output(LED_GREEN, GPIO.LOW)
    
    # blue
    GPIO.output(LED_BLUE, GPIO.HIGH)
    time.sleep(1)
    GPIO.output(LED_BLUE, GPIO.LOW)

except KeyboardInterrupt:
GPIO.cleanup()
print("\nend")`

@rm-hull @evilbeave

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