guowenxue
2021-04-21 0fa05ec9d808e1872a1c7d75bffeaa3114a3be61
modules/python/infrared.py
old mode 100644 new mode 100755
@@ -1,8 +1,12 @@
#!/usr/bin/python
#-*- coding: utf-8 -*-
import time
import signal
import RPi.GPIO as GPIO
INFR_PIN=16
# I/O Pin connected to Physical PIN#16, BCM code pin number is 20 and wPi pin number is 28
INFR_PIN=20
def sig_proc(signum, frame):
    print("Catch stop signal and program exit now...")
@@ -13,7 +17,7 @@
 
def init():
    GPIO.setwarnings(False)
    GPIO.setmode(GPIO.BOARD)
    GPIO.setmode(GPIO.BCM)
    GPIO.setup(INFR_PIN, GPIO.IN)
    pass