Is there someone that knows how to simply turn on or off a gpio pin? I don't understand why rpi have to make it so hard. I hope someone gives me an answer, ask me if you don't understand the question. I have tried for a long time to find info online and ended up on this page.
Here is an example of turning GPIO pin 23 on/off using the RPi.GPIO library:
import RPi.GPIO as GPIO import time gpioPin = 23 GPIO.setmode(GPIO.BCM) GPIO.setwarnings(False) GPIO.setup(gpioPin, GPIO.OUT) while True: print('on') GPIO.output(gpioPin, GPIO.HIGH) time.sleep(1) print('off') GPIO.output(gpioPin, GPIO.LOW) time.sleep(1)