I usually use RPi.GPIO
module like this to set up the GPIO pins:
import RPi.GPIO as GPIO
GPIO.setmode(GPIO.BCM)
GPIO.setup(18, GPIO.IN, pull_up_down=GPIO.PUD_UP)
GPIO.setup(17, GPIO.IN, pull_up_down=GPIO.PUD_UP)
Is it possible to change mode of a pin to ALT5
like I would do with wiringpi
's gpio
tool :
> gpio -g mode 15 alt5 // sets GPIO 15 pin to ALT 5 mode
but with Python's RPi.GPIO
?