How to control electronic component connected to the GIO board ?
Solution:
Follow the instruction of the electronic component, for exmaple led light need to be connected in serial with a resitant, active buzzers can be connected directed between the gpio output and the gnd pin.
once you have connected the electronic component, follow the next code structure to control it:
import RPi.GPIO as GPIOimport timev_compo = 10GPIO.setmode(GPIO.BCM)GPIO.setwarnings(False)GPIO.setup(v_compo, GPIO.OUT)print("LED on")GPIO.output(v_compo, 1)time.sleep(v_sleep)print("LED of")GPIO.output(v_compo, 0)time.sleep(v_sleep)