From 732d1963ed83abf4e5f1b06ec451a6943421d716 Mon Sep 17 00:00:00 2001
From: Guo Wenxue <guowenxue@gmail.com>
Date: Thu, 22 Sep 2022 00:36:11 +0800
Subject: [PATCH] update ds18b20.c to snprintf

---
 modules/python/infrared.py |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/modules/python/infrared.py b/modules/python/infrared.py
old mode 100644
new mode 100755
index 6ab73b3..55d064a
--- a/modules/python/infrared.py
+++ b/modules/python/infrared.py
@@ -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
  

--
Gitblit v1.9.1