Raspberry Pi ile tek kanal role kontrolu
Merhaba, raspberry pi ile tek kanal role kontrolu icin asagidaki kodu kullanabilirsiniz. Kodu durdurana kadar role aktiftir.
import RPi.GPIO as GPIOGPIO.setwarnings(False)GPIO.setmode(GPIO.BCM)ROL = 14GPIO.setup(ROL, GPIO.OUT)try:while (True):GPIO.output(ROL, GPIO.LOW)except KeyboardInterrupt:GPIO.output(ROL,GPIO.HIGH)GPIO.cleanup()
Comments
Leave a Comment