RPi GPIO Code Samples - eLinux.org
https://elinux.org/RPi_GPIO_Code_Samples15.12.2020 · import rpi.gpio as gpio # use p1 header pin numbering convention gpio.setmode(gpio.board) # set up the gpio channels - one input and one output gpio.setup(11, gpio.in) gpio.setup(12, gpio.out) # input from pin 11 input_value = gpio.input(11) # output to pin 12 gpio.output(12, gpio.high) # the same script as above but using bcm gpio 00..nn numbers …