READING

Raspberry Pi ile tek kanal role kontrolu

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 GPIO
GPIO.setwarnings(False)
GPIO.setmode(GPIO.BCM)
ROL = 14
GPIO.setup(ROL, GPIO.OUT)
try:
    while (True):
        GPIO.output(ROL, GPIO.LOW)
except KeyboardInterrupt:
    GPIO.output(ROL,GPIO.HIGH)
    GPIO.cleanup()

RELATED POST

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.