guowenxue
2022-04-10 c7685f9912e89509acff5d2db54f9b3e955df2ee
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