The code configures the GPIO as an output. You need an input.
By the way, the code could not run, because of SyntaxErrors.
Instead, use GPIO.IN.
You can also configure more than one GPIO, if you put the integers into a list or tuple and us this instead of a single int.
By the way, the code could not run, because of SyntaxErrors.
Code:
GPIO.setup(18, GPIO.OUT)GPIO.output(18, 0) #BUTTON BLUEGPIO.setup(18, , pull_up_down=GPIO.PUD_DOWN) # invalid syntax, two commas
You can also configure more than one GPIO, if you put the integers into a list or tuple and us this instead of a single int.
Code:
GPIO.setup([12, 13, 14, 15], GPIO.OUT)
Statistics: Posted by DeaD_EyE — Thu Nov 14, 2024 9:38 am