{"id":19376,"date":"2022-06-09T00:00:08","date_gmt":"2022-06-08T16:00:08","guid":{"rendered":"https:\/\/techclass.wfjydl.com\/?p=19376"},"modified":"2022-12-08T15:58:22","modified_gmt":"2022-12-08T07:58:22","slug":"geekcraft%ef%bc%9a%e6%9e%84%e5%bb%ba%e6%82%a8%e8%87%aa%e5%b7%b1%e7%9a%84raspberry-pi%e8%bf%90%e5%8a%a8%e6%a3%80%e6%b5%8b%e5%99%a8","status":"publish","type":"post","link":"https:\/\/techclass.wfjydl.com\/knowledge\/tech-info\/raspberry\/geekcraft-build-your-own-raspberry-pi-motion-detector","title":{"rendered":"Geekcraft\uff1a\u6784\u5efa\u60a8\u81ea\u5df1\u7684Raspberry Pi\u8fd0\u52a8\u68c0\u6d4b\u5668"},"content":{"rendered":"<p>\u8fd9\u7bc7\u6587\u7ae0\u6765\u6e90\u4e8e<a href=\"https:\/\/www.deviceplus.com\/\">DevicePlus.com<\/a>\u82f1\u8bed\u7f51\u7ad9\u7684\u7ffb\u8bd1\u7a3f\u3002<\/p>\n<h2>\u76ee\u5f55<\/h2>\n<p><strong>1. PIR\u4f20\u611f\u5668\u7b80\u4ecb<\/strong><br \/>\n<strong>1.1 \u4f18\u70b9\u548c\u7f3a\u70b9<\/strong><br \/>\n<strong>1.2 \u60a8\u5c06\u8981\u5b66\u4e60\u7684\u5185\u5bb9<\/strong><br \/>\n<strong>2. \u5c06PIR\u4f20\u611f\u5668\u4e0eRaspberry Pi\u8fde\u63a5<\/strong><br \/>\n<strong>2.1 \u8bbe\u7f6e\u73af\u5883<\/strong><br \/>\n<strong>2.2 GPIO\u5f15\u811a\u7f16\u53f7\u65b9\u6848<\/strong><br \/>\n<strong>2.3 \u793a\u4f8bPIR\u7535\u8def\u548c\u4ee3\u7801<\/strong><\/p>\n<h2>1. PIR\u4f20\u611f\u5668\u7b80\u4ecb<\/h2>\n<p>PIR\u662f\u88ab\u52a8\u7ea2\u5916\u7684\u9996\u5b57\u6bcd\u7f29\u5199\uff0c\u5177\u6709\u5f88\u68d2\u7684\u6027\u80fd\uff0c\u56e0\u4e3a\u5b83\u4e0d\u53d1\u5c04\u4efb\u4f55\u7ea2\u5916\u5149\uff08\u8fd9\u610f\u5473\u7740\u4f4e\u529f\u8017\uff09\uff0c\u53ea\u7528\u4e8e\u68c0\u6d4b\u5176\u89c6\u573a\u4e2d\u5feb\u901f\u53d8\u5316\u7684\u7ea2\u5916\u5149\u3002<\/p>\n<p>\u4f20\u611f\u90e8\u5206\u662f\u4e00\u4e2a\u53cc\u91d1\u5c5e\u70ed\u91ca\u7535\u4f20\u611f\u5668\uff0c\u7531\u5bf9\u7ea2\u5916\u5149\u54cd\u5e94\u65b9\u5f0f\u4e0d\u540c\u7684\u4e24\u79cd\u6750\u6599\u7ec4\u6210\uff0c\u5176\u5fae\u5f31\u7684\u7535\u8f93\u51fa\u4fe1\u53f7\u4f1a\u88ab\u4f4e\u566aJFET\u653e\u5927\uff0c\u4ee5\u4ea7\u751f\u53ef\u7528\u7684\u7535\u538b\u8f93\u51fa\u3002<\/p>\n<p>\u7531\u4e8e\u70ed\u91ca\u7535\u4f20\u611f\u5668\u677f\u662f\u5e73\u7684\uff0c\u4e0d\u9002\u5408\u7528\u4e8e\u8bf8\u5982110\u5ea6\u8fd9\u6837\u7684\u89c6\u573a\uff0c\u6240\u4ee5\u53ef\u4ee5\u6dfb\u52a0\u4e00\u4e2a\u83f2\u6d85\u5c14\u900f\u955c\u8fdb\u884c\u805a\u7126\uff0c\u8fd9\u4e0e\u7f8e\u56fd\u5b87\u822a\u5c40\u7684\u6df1\u7a7a\u5929\u7ebf\u975e\u5e38\u76f8\u4f3c\u3002\u8be5\u5706\u5f62\u5851\u6599\u90e8\u4ef6\u4f4d\u4e8e\u4f20\u611f\u5668\u524d\u4fa7\uff0c\u65e8\u5728\u5c06\u7ea2\u5916\u7ebf\u53cd\u5c04\u5230\u6784\u6210\u70ed\u91ca\u7535\u4f20\u611f\u5668\u7684\u4e24\u4e2a\u91d1\u5c5e\u677f\u4e0a\uff0c\u4ece\u800c\u8bfb\u53d6\u7ea2\u5916\u70ed\u50cf\u7684\u53d8\u5316\u3002<\/p>\n<p>\u6839\u636e\u8bbe\u8ba1\uff0c\u901a\u8fc7\u653e\u5927\u7ea7\uff0cPIR\u4f20\u611f\u5668\u80fd\u591f\u89e6\u53d1\u7ee7\u7535\u5668\uff08\u4f8b\u5982\u6253\u5f00\u706f\u5149\uff09\u6216\u5411\u9644\u8fd1\u7684\u88c5\u7f6e\u53d1\u9001\u4fe1\u53f7\uff0c\u901a\u77e5\u5b83\u5728\u7279\u5b9a\u533a\u57df\u6709\u8fd0\u52a8\u53d1\u751f\u3002\u8fd9\u79cd\u529f\u80fd\u5728\u6211\u4eec\u7684\u73b0\u4ee3\u751f\u6d3b\u4e2d\u65e0\u5904\u4e0d\u5728\uff0c\u6bd4\u5982\u60a8\u9644\u8fd1\u6bcf\u4e00\u6b21\u4f4e\u6c89\u7684\u201c\u5494\u55d2\u201d\u58f0\u548c\u7a81\u7136\u7684\u7167\u660e\uff0c\u90fd\u662f\u901a\u8fc7\u4f7f\u7528\u8fd9\u4e9b\u5148\u8fdb\u7684\u4f20\u611f\u5668\u5b9e\u73b0\u7684\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-8973\" src=\"https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/02\/raspberry-pi-motion-detector.jpg\" alt=\"Raspberry Pi PIR diagram\" width=\"700\" height=\"459\" srcset=\"https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/02\/raspberry-pi-motion-detector.jpg 700w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/02\/raspberry-pi-motion-detector-300x197.jpg 300w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/02\/raspberry-pi-motion-detector-223x146.jpg 223w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/02\/raspberry-pi-motion-detector-50x33.jpg 50w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/02\/raspberry-pi-motion-detector-114x75.jpg 114w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/><\/p>\n<h2>1.1 \u4f18\u70b9\u548c\u7f3a\u70b9<\/h2>\n<p>PIR\u4f20\u611f\u5668\u53ef\u9760\u6027\u597d\u3001\u5bff\u547d\u957f\uff0c\u6700\u91cd\u8981\u7684\u662f\uff0c\u53ef\u4ee5\u7075\u6d3b\u5e94\u7528\u4e8e\u5f88\u591a\u573a\u666f\uff0c\u901a\u5e38\u5177\u6709\u53ef\u8c03\u8282\u7684\u7ea2\u5916\u9608\u503c\u548c\u5f00\u542f\u65f6\u95f4\u3002<\/p>\n<p>\u7136\u800c\uff0cPIR\u4f20\u611f\u5668\u4e5f\u5b58\u5728\u5c40\u9650\u6027\u3002\u5b83\u4eec\u5bb9\u6613\u51fa\u73b0\u8bef\u62a5\uff08\u51fa\u4e8e\u4e00\u4e9b\u5e38\u89c1\u7684\u60c5\u51b5\uff0c\u5982\u6c14\u6d41\uff09\uff0c\u800c\u9ad8\u5ea6\u51c6\u786e\u7684\u8fd0\u52a8\u68c0\u6d4b\u6700\u597d\u4f7f\u7528\u5fae\u6ce2\u4f20\u611f\u5668\uff0c\u4f8b\u5982\uff0c\u6602\u8d35\u7684\u6c7d\u8f66\u62a5\u8b66\u5668\u90fd\u4f1a\u4f7f\u7528\u5fae\u6ce2\u4f20\u611f\u5668\u3002<\/p>\n<p>PIR\u5728\u9996\u6b21\u901a\u7535\u65f6\u8fd8\u9700\u8981\u957f\u8fbe30-60\u79d2\u7684\u65f6\u95f4\u624d\u80fd\u7a33\u5b9a\u4e0b\u6765\uff0c\u5e76\u4e14\u901a\u5e38\u9996\u6b21\u901a\u7535\u65f6\u4f1a\u5728\u4fe1\u53f7\u5f15\u811a\u4e0a\u89e6\u53d1\u81f3\u5c11\u4e00\u4e2a\u8bef\u62a5\u3002\u8fd9\u662f\u56e0\u4e3a\u5b83\u4eec\u4f1a\u54cd\u5e94\u4e0d\u65ad\u53d8\u5316\u7684\u7ea2\u5916\u70ed\u50cf\uff0c\u800c\u901a\u7535\u6784\u6210\u4e86\u53d8\u5316\u3002\u8fd9\u610f\u5473\u7740\u60a8\u7684\u8bbe\u5907\u53ef\u80fd\u4e0d\u5f97\u4e0d\u5ef6\u8fdf\u64cd\u4f5c\uff0c\u76f4\u5230PIR\u7a33\u5b9a\u4e0b\u6765\u3002\u5177\u4f53\u60c5\u51b5\u53d6\u51b3\u4e8e\u4e0d\u540c\u7684\u5e94\u7528\u573a\u666f\uff0c\u8fd9\u53ef\u80fd\u4f1a\u6709\u70b9\u9ebb\u70e6\u3002<\/p>\n<h2>1.2 \u60a8\u5c06\u4f1a\u5b66\u5230\u7684\u5185\u5bb9<\/h2>\n<p>\u5728\u540e\u6587\u4e2d\u6211\u4eec\u5c06\u8981\u4f7f\u7528\u7684\u57fa\u4e8eRaspberry Pi\u7684 HC-SR501\u5e26\u6709\u5f88\u591a\u65cb\u94ae\u548c\u63a7\u5236\u6746\u3002\u60a8\u53ef\u4ee5\u5bf9\u6240\u6709\u7684\u529f\u80fd\u548c\u4ea4\u4e92\u65b9\u5f0f\u8fdb\u884c\u8c03\u6574\u6765\u4e3a\u60a8\u7684\u5e94\u7528\u63d0\u4f9b\u5b8c\u7f8e\u7684\u611f\u5e94\u8f93\u5165\u4fe1\u606f\u3002<\/p>\n<p>\u60a8\u7684PIR\u4f20\u611f\u5668\u5fc5\u9700\u8981\u4e0e\u5176\u4ed6\u5143\u4ef6\u8fde\u63a5\uff0c\u5426\u5219\u4e0d\u4f1a\u6709\u4efb\u4f55\u4f5c\u7528\u3002\u901a\u8fc7\u672c\u6587\uff0c\u60a8\u5c06\u5b66\u4e60\u5982\u4f55\u5c06\u5176\u4e0e\u60a8\u7684Raspberry Pi\u8fde\u63a5\u3002\u6211\u4eec\u63d0\u4f9b\u4e86\u793a\u4f8b\u4ee3\u7801\uff0c\u5728shell\u811a\u672c\u4e2d\u4f7f\u7528\u4e86WiringPi\u7684\u201cgpio\u201d\u5e93\u3002<\/p>\n<p>\u60a8\u53ef\u4ee5\u6839\u636e\u81ea\u5df1\u7684\u610f\u613f\u5bf9\u5176\u8fdb\u884c\u4fee\u6539\uff0c\u8fd9\u5f88\u5bb9\u6613\uff0c\u5c24\u5176\u662f\u53c2\u7167\u300a\u9ad8\u7ea7Bash\u811a\u672c\u7f16\u7a0b\u6307\u5357\u300b\u7684\u8bdd\uff0c\u6211\u4eec\u63a5\u4e0b\u6765\u5c31\u4f1a\u5b89\u88c5\u8be5\u6307\u5357\u3002<\/p>\n<h2>2. \u5c06PIR\u4f20\u611f\u5668\u4e0eRaspberry Pi\u8fde\u63a5<\/h2>\n<p>\u60a8\u9700\u8981\u5148\u8bbe\u7f6e\u81ea\u5df1\u7684Raspberry Pi\uff0c\u8bf7\u6839\u636e<a href=\"https:\/\/www.deviceplus.com\/raspberry-pi\/diy-tip-how-to-set-up-your-raspberry-pi\/\" target=\"_blank\" rel=\"noopener\">\u672c\u6307\u5357<\/a>\u5feb\u901f\u5b8c\u6210\u6b64\u64cd\u4f5c\u3002<\/p>\n<h2>2.1 \u8bbe\u7f6e\u73af\u5883<\/h2>\n<p>\u5b8c\u6210\u540e\uff0c\u5c06\u4e0b\u9762\u7684\u811a\u672c\u590d\u5236\u5230\u60a8\u7684Raspberry Pi\uff0c\u7136\u540e\u8fd0\u884c\u5b83\uff1a<\/p>\n<div class=\"hcb_wrap\">\n<pre class=\"prism undefined-numbers lang-c\" data-lang=\"C\"><code>\r\nsudo bash rpi_prepare.sh\r\n\r\n<\/code><\/pre>\n<\/div>\n<p>&nbsp;<\/p>\n<p>\u8be5\u547d\u4ee4\u5c06\u7528\u4e8e\u5b89\u88c5\u4e0e<a href=\"https:\/\/www.deviceplus.com\/raspberry-pi\/making-the-gpio-easier-with-gpio-zero\/\">GPIO<\/a>\u786c\u4ef6\u63a5\u53e3\u76f8\u5173\u7684\u5927\u591a\u6570\u8f6f\u4ef6\u5305\u3002\u201cabs-guide\u201d\u5305\u5c06\u7528\u4e8e\u5b89\u88c5\u300a\u9ad8\u7ea7Bash\u811a\u672c\u7f16\u7a0b\u6307\u5357\u300b\uff0c\u5efa\u8bae\u6240\u6709\u7528\u6237\u90fd\u5b89\u88c5\u8be5\u6307\u5357\u3002\u53ef\u4ee5\u5728\u4ee5\u4e0b\u4f4d\u7f6e\u627e\u5230\u5b83\uff1a<\/p>\n<p>\u201c\/usr\/share\/doc\/abs-guide\/html\/index.html\u201d\u3002<\/p>\n<p>\u4e13\u4e1a\u63d0\u793a\uff1a\u4f5c\u4e3a\u7528\u6237\u201cpi\u201d\uff0c\u5c06\u4ee5\u4e0b\u5185\u5bb9\u7c98\u8d34\u5230\u60a8\u7684\u7ec8\u7aef\u4e2d\uff1a<\/p>\n<div class=\"hcb_wrap\">\n<pre class=\"prism undefined-numbers lang-c\" data-lang=\"C\"><code>\r\ncd \/usr\/share\/doc\/abs-guide\/html &amp;amp;&amp;amp; \\\r\npython -m SimpleHTTPServer &amp;gt;\/dev\/null 2&amp;gt;&amp;amp;1 &amp;amp;\r\ncd -\r\n\r\n<\/code><\/pre>\n<\/div>\n<p>&nbsp;<\/p>\n<p>\u5e76\u5728 http:\/\/raspberry.local:8000 \u67e5\u770b\u6307\u5357\u2014\u5982\u679c\u60a8\u7684\u5de5\u4f5c\u7ad9\u548cPi\u4e4b\u95f4\u7684mDNS\u65e0\u6cd5\u6b63\u5e38\u8fd0\u884c\uff0c\u8bf7\u4f7f\u7528\uff1a<\/p>\n<div class=\"hcb_wrap\">\n<pre class=\"prism undefined-numbers lang-c\" data-lang=\"C\"><code>\r\nhostname -I\r\n\r\n<\/code><\/pre>\n<\/div>\n<p>&nbsp;<\/p>\n<p>\u7136\u540e\u83b7\u53d6IP\u5730\u5740\uff0c\u63a5\u4e0b\u6765\u8bbf\u95ee http:\/\/pi-ip:8000 &#8230;<\/p>\n<p>&#8212; \u6216\u8005\uff0c\u53ef\u4ee5\u70b9\u51fb<a href=\"https:\/\/www.tldp.org\/LDP\/abs\/abs-guide.pdf\" target=\"_blank\" rel=\"noopener\">\u6b64\u5904<\/a>\u4e0b\u8f7dPDF\u683c\u5f0f\u6587\u4ef6\u3002<\/p>\n<p>\u5373\u4f7f\u60a8\u4e0d\u6253\u7b97\u7f16\u5199\u811a\u672c\uff0c\u800c\u53ea\u662f\u4f7f\u7528\u7ec8\u7aef\uff0c\u672c\u6307\u5357\u4e5f\u4f1a\u975e\u5e38\u6709\u7528\u3002<\/p>\n[ begin rpi_prepare.sh ]\n<div class=\"hcb_wrap\">\n<pre class=\"prism undefined-numbers lang-c\" data-lang=\"C\"><code>\r\n#! \/usr\/bin\/env bash\r\nset -eu -o pipefail\r\nDEBIAN_FRONTEND=\"noninteractive\"\r\nDEBIAN_PRIORITY=\"critical\"\r\nDEBCONF_NOWARNINGS=\"yes\"\r\nexport DEBIAN_FRONTEND DEBIAN_PRIORITY DEBCONF_NOWARNINGS\r\n\r\n_pkg_list=\"vim zip unzip curl wget pigpio wiringpi rsync wiringpi \r\npython-rpi.gpio python3-rpi.gpio rpi.gpio-common git python3-serial \r\npython-serial abs-guide python-gpiozero python-gpiozero-doc \r\npython3-gpiozero\"\r\n\r\n# Upgrade system and installed packages\r\nsudo apt update || ech o failed to update index list \r\nsudo dpkg --configure -a || ech o failed to fix \\\r\ninterrupted upgrades\r\nsudo apt --fix-broken --fix-missing install || ech o \\\r\nfailed to fix conflicts \r\nsudo apt -y --allow-downgrades --fix-broken \\\r\n--fix-missing dist-upgrade \r\n\r\n# Install $_pkg_list\r\nsudo apt update\r\nsudo apt-get -y install $_pkg_list\r\n\r\n<\/code><\/pre>\n<\/div>\n<p>&nbsp;<\/p>\n[ end rpi_prepare.sh ]\n<p>\u5982\u679c\u60a8\u5728<a href=\"https:\/\/www.deviceplus.com\/raspberry-pi\/an-introduction-to-building-electronic-kits-with-the-raspberry-pi-4-mastering-the-use-of-the-raspberry-pi-4-in-headless-mode\/\">\u65e0\u5934\u6a21\u5f0f\u4e0b\u8fd0\u884cRaspberry Pi <\/a>\u5e76\u5e0c\u671b\u6dfb\u52a0SSH\u8fde\u63a5\uff0c\u8bf7\u5728 \u5faeSD\u7684\u7b2c\u4e00\u4e2a\u5206\u533a\uff08\/boot\uff09\u4e0a\u521b\u5efa\u4e00\u4e2a\u540d\u4e3a\u201cssh\u201d\u7684\u6587\u4ef6\uff0c\u4ee5\u5141\u8bb8\u5728\u9996\u6b21\u542f\u52a8\u65f6\u8fdb\u884cSSH\u8bbf\u95ee\u3002\u5982\u679c\u60a8\u4f7f\u7528\u7684\u662fUSB-TTL\u9002\u914d\u5668\uff0c\u8bf7\u53d1\u51fa\u4ee5\u4e0b\u547d\u4ee4\u4ee5\u786e\u4fdd\u4e32\u884c\u8fde\u63a5\uff1a<\/p>\n<div class=\"hcb_wrap\">\n<pre class=\"prism undefined-numbers lang-c\" data-lang=\"C\"><code>\r\nsudo ech o 'enable_uart=1' &amp;gt;&amp;gt; \/PATH\/TO\/BOOT\/MOUNTPOINT\/config.txt\r\n\r\n<\/code><\/pre>\n<\/div>\n<p>&nbsp;<\/p>\n<h2>2.2 GPIO\u5f15\u811a\u7f16\u53f7\u65b9\u6848<\/h2>\n<p>\u4e2d\u7ea7\/\u9ad8\u7ea7\u7528\u6237\u53ef\u4ee5\u8df3\u8fc7\u6b64\u90e8\u5206\u3002\u521a\u63a5\u89e6GPIO\u7684\u4eba\u9700\u8981\u4e86\u89e3\u4e00\u4e0b\u8be5\u90e8\u5206\u5185\u5bb9\u3002\u5728Raspberry Pi\u7cfb\u7edf\u4e0a\uff0c\u5f15\u811a\u7684\u7f16\u53f7\u81f3\u5c11\u6709\u4e24\u79cd\u65b9\u6848\uff1aBCM\u548cBOARD\u3002BCM\u65b9\u5f0f\u6666\u6da9\u96be\u61c2\uff0c\u4f46\u662f\u5f88\u4fbf\u643a\u3002\u800cBOARD\u7b80\u5355\u6613\u61c2\uff0c\u5c31\u50cf\u201c1-2-3\u201d\u8fd9\u6837\uff0c<a href=\"https:\/\/techclass.wfjydl.com\/knowledge\/tech-info\/how-tos\/raspberry\/an-introduction-to-raspberry-pi-gpio-pins\">GPIO\u5f15\u811a<\/a>\u4f4d\u4e8e\u677f\u7684\u53f3\u4fa7\uff0c\u5faeSD\u69fd\u5728\u80cc\u5bf9\u60a8\u7684\u4f4d\u7f6e\u3002\u4f46\u8bf7\u6ce8\u610f\uff0c\u8fd9\u53ef\u80fd\u4f1a\u56e0\u5177\u4f53\u60c5\u51b5\u6709\u6240\u53d8\u5316\uff01<\/p>\n<p>\u5f15\u811a1\u4e3a3V3\uff0c\u5f15\u811a2\u4e3a5V\uff0c\u4ee5\u6b64\u7c7b\u63a8\u3002\u6b64\u7f16\u7801\u65b9\u6848\u53ef\u4ee5\u8ba9\u60a8\u4ece\u9876\u90e8\u5f00\u59cb\u8ba1\u6570\uff0c\u76f4\u5230\u627e\u5230\u6240\u9700\u5f15\u811a\u4e3a\u6b62\u3002\u7b2c\u4e09\u4e2a\u662fWiringPi\u7684\u7f16\u53f7\u65b9\u6848\uff0c\u53ef\u4ee5\u76f4\u63a5\u4f7f\u7528GPIO\u7f16\u53f7\uff0c\u6211\u4e0d\u9009\u62e9\u4f7f\u7528\u8fd9\u4e2a\u65b9\u6cd5\uff0c\u4e5f\u4e0d\u63a8\u8350\u60a8\u4f7f\u7528\u3002\u8bf7\u4f7f\u7528BCM\u6216BOARD\u7f16\u53f7\uff0c\u8fd9\u7edd\u5bf9\u662f\u6b63\u786e\u7684\u9009\u62e9\u3002<\/p>\n<p>\u60a8\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u547d\u4ee4\u4f7f\u7528\u201cwiringpi\u201d\u8f6f\u4ef6\u4e2d\u7684gpio\u5b9e\u7528\u7a0b\u5e8f\u6765\u4e34\u65f6\u67e5\u770b\u8fd9\u4e9b\u7f16\u53f7\u65b9\u6848\u7684\u7f16\u53f7\u5bf9\u5e94\u65b9\u5f0f\u3002<\/p>\n<div class=\"hcb_wrap\">\n<pre class=\"prism undefined-numbers lang-c\" data-lang=\"C\"><code>\r\ngpio readall\r\n\r\n<\/code><\/pre>\n<\/div>\n<p>&nbsp;<\/p>\n<p>\u8f93\u51fa\u5185\u5bb9\u5982\u4e0b\u6240\u793a\uff1a<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-8974\" src=\"https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/02\/gpio_readall.png\" alt=\"\" width=\"871\" height=\"582\" srcset=\"https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/02\/gpio_readall.png 871w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/02\/gpio_readall-300x200.png 300w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/02\/gpio_readall-768x513.png 768w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/02\/gpio_readall-218x146.png 218w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/02\/gpio_readall-50x33.png 50w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/02\/gpio_readall-112x75.png 112w\" sizes=\"auto, (max-width: 871px) 100vw, 871px\" \/><\/p>\n<p>\u663e\u793a\u5185\u5bb9\u53ef\u80fd\u4f1a\u56e0\u6240\u4f7f\u7528\u5f00\u53d1\u677f\u7684\u4e0d\u540c\u800c\u4e0d\u540c\u3002\u8bf7\u53c2\u9605<a href=\"https:\/\/pinout.xyz\">Pinout.xyz<\/a>\u7f51\u7ad9\u4e86\u89e3\u6240\u6709Raspberry Pi\u677f\u7684\u5f15\u811a\u56fe\u4fe1\u606f\uff0c\u8fd9\u53ef\u4ee5\u8282\u7701\u5f88\u591a\u65f6\u95f4\uff01<\/p>\n<h2>2.3 \u793a\u4f8bPIR\u7535\u8def\u548c\u4ee3\u7801<\/h2>\n<p>\u60a8\u5c06\u9700\u8981\u4ee5\u4e0b\u5143\u4ef6\u6765\u6784\u5efa<br \/>\n<strong>\u7535\u8def:<\/strong><\/p>\n<p><strong>BOM<\/strong>:<\/p>\n<p>&nbsp;<\/p>\n<table>\n<tbody>\n<tr>\n<td><span style=\"font-weight: 400;\">Raspberry Pi 4<\/span><\/td>\n<td><span style=\"font-weight: 400;\">https:\/\/www.amazon.com\/Raspberry-Model-2019-Quad-Bluetooth\/dp\/B07TD42S27\/ref=sr_1_3?keywords=raspberry+pi+4&amp;qid=1581051818&amp;sr=8-3<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">HC-SR501 PIR \u4f20\u611f\u5668<\/span><\/td>\n<td><span style=\"font-weight: 400;\">https:\/\/protosupplies.com\/product\/hc-sr501-pir-motion-sensing-module\/<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">\u675c\u90a6\u7535\u7ebf<\/span><\/td>\n<td><span style=\"font-weight: 400;\">https:\/\/www.amazon.com\/Elegoo-EL-CP-004-Multicolored-Breadboard-arduino\/dp\/B01EV70C78\/ref=sr_1_2?keywords=dupont+wire&amp;qid=1581051893&amp;sr=8-2<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">\u9762\u5305\u677f<\/span><\/td>\n<td><span style=\"font-weight: 400;\">https:\/\/www.amazon.com\/Pcs-MCIGICM-Points-Solderless-Breadboard\/dp\/B07PCJP9DY\/ref=sr_1_8?keywords=breadboard&amp;qid=1581051922&amp;sr=8-8<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">极悦娱乐 SLR343BC4TT32 3mm LED<\/span><\/td>\n<td><span style=\"font-weight: 400;\">https:\/\/www.digikey.com\/products\/en?keywords=极悦娱乐%20SLR343BC4TT32<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">2x 1kOhm \u7535\u963b<\/span><\/td>\n<td><span style=\"font-weight: 400;\">https:\/\/www.amazon.com\/Projects-100EP5121K00-Ohm-Resistors-Pack\/dp\/B0185FIJ9A\/ref=sr_1_3?keywords=resistor+1k+ohm&amp;qid=1581052039&amp;sr=8-3<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u4e00\u65e6\u60a8\u628a\u5143\u4ef6\u7ec4\u88c5\u5728\u4e86\u4e00\u8d77\uff0c\u5b8c\u6210\u9762\u5305\u677f\u4e0a\u7684\u7535\u8def\u8fde\u63a5\u5c31\u5f88\u5bb9\u6613\u4e86\u3002\u8bf7\u6309\u7167\u4e0b\u56fe\u8fde\u63a5\uff0c\u7279\u522b\u6ce8\u610f\u60a8\u8981\u8fde\u63a5\u7684Pi GPIO\u5f15\u811a\u3002<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-8975\" src=\"https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/02\/rpi_pir_diagram.png\" alt=\"Raspberry Pi PIR diagram\" width=\"2391\" height=\"1110\" srcset=\"https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/02\/rpi_pir_diagram.png 2391w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/02\/rpi_pir_diagram-300x139.png 300w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/02\/rpi_pir_diagram-768x357.png 768w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/02\/rpi_pir_diagram-1024x475.png 1024w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/02\/rpi_pir_diagram-260x121.png 260w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/02\/rpi_pir_diagram-50x23.png 50w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/02\/rpi_pir_diagram-150x70.png 150w\" sizes=\"auto, (max-width: 2391px) 100vw, 2391px\" \/><\/p>\n<p>HC-SR501\u63a5\u53d75\u523012V\u7684\u8f93\u5165\u7535\u538b\uff0c\u56e0\u6b64\u8bf7\u4ece5V\u5f15\u811a\uff08\u65e2\u7136\u6211\u4eec\u5df2\u7ecf\u719f\u7ec3\u638c\u63e1\u5f15\u811a\u7f16\u53f7\u65b9\u6848\u4e86\uff0c\u53ef\u4ee5\u76f4\u63a5\u8bf4\u662fBOARD2\u548cBOARD4\uff09\u62c9\u4e00\u6839\u6761\u7ebf\u5230\u9762\u5305\u677f\u76845V\/\u7ea2\u8272\u7535\u6e90\u8f68\u3002<\/p>\n<p>\u7136\u540e\u5c06\u4e00\u6839\u6761\u7ebf\u4eceGND\uff08BOARD6\uff09\u62c9\u5230\u9ed1\u8272\u8f68\u4e0a\u3002<\/p>\n<p>\u4ece\u90a3\u91cc\u5c065V\u8fde\u63a5\u5230HC-SR501\u7684\u5f15\u811a3\uff0c\u5e76\u5c06GND\u8fde\u63a5\u5230\u5f15\u811a1\u3002<\/p>\n<p>\u5728PIR\u7684\u5f15\u811a2\u548cRaspberry Pi\u7684BCM25\/BOARD22\u5f15\u811a\u4e4b\u95f4\u653e\u7f6e\u4e00\u4e2a1kOhm\u7684\u7535\u963b\uff0c\u4ee5\u5ef6\u957fPi\u5f15\u811a\u7684\u4f7f\u7528\u5bff\u547d\uff0c\u4e14\u4fe1\u53f7\u4e0d\u4f1a\u53d7\u5230\u5f71\u54cd\u3002\u8fd9\u5c31\u662f\u6211\u4eec\u7684\u8f93\u5165\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-8976\" src=\"https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/02\/rpi_and_pir_active.jpg.jpg\" alt=\"Raspberry Pi senses motion\" width=\"976\" height=\"732\" srcset=\"https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/02\/rpi_and_pir_active.jpg.jpg 976w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/02\/rpi_and_pir_active.jpg-300x225.jpg 300w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/02\/rpi_and_pir_active.jpg-768x576.jpg 768w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/02\/rpi_and_pir_active.jpg-195x146.jpg 195w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/02\/rpi_and_pir_active.jpg-50x38.jpg 50w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/02\/rpi_and_pir_active.jpg-100x75.jpg 100w\" sizes=\"auto, (max-width: 976px) 100vw, 976px\" \/><\/p>\n<p>\u5f53\u60a8\u5e0c\u671b\u8c03\u6574\u4fe1\u53f7\u5f15\u811a3V3\u4e0a\u4fe1\u53f7\u7684IR\u7075\u654f\u5ea6\u3001\u89e6\u53d1\u884c\u4e3a\uff08\u4f4d\u7f6e\u4e3aH\u548cL\u76843P\u63a5\u5934\uff09\u4ee5\u53ca\u5bfc\u901a\u65f6\u95f4\u65f6\uff0c\u8bf7\u53c2\u9605HC-SR501\u7684<a href=\"https:\/\/components101.com\/hc-sr501-pir-sensor\" target=\"_blank\" rel=\"noopener\">\u6307\u5357<\/a>\u3002\u6280\u672f\u89c4\u683c\u4e66\u53ef\u70b9\u51fb<a href=\"https:\/\/components101.com\/sites\/default\/files\/component_datasheet\/HC%20SR501%20PIR%20Sensor%20Datasheet.pdf\" target=\"_blank\" rel=\"noopener\">\u6b64\u5904<\/a>\u83b7\u53d6\u3002<\/p>\n<p>\u5728\u4e0b\u6587\u4e2d\u60a8\u4f1a\u770b\u5230\u6211\u5c06\u8df3\u7ebf\u8bbe\u7f6e\u4e3a\u201c\u65e0\u91cd\u590d\u201d\uff08L\uff09\uff0c\u8fd9\u610f\u5473\u7740\u53ea\u8981\u6709\u8fd0\u52a8\uff0c\u5b83\u7684\u4fe1\u53f7\u5c31\u4f1a\u4fdd\u6301\u57283V3\u2014\u8fd9\u6709\u70b9\u4e0d\u53ef\u9760\u3002\u7535\u5bb9\u5668\u770b\u8d77\u6765\u4e5f\u4e0d\u53ef\u9760\uff0c\u4f46\u662f\u53ea\u8981\u4f7f\u7528\u4e00\u4e9b\u70ed\u80f6\uff0c\u5b83\u4eec\u5c31\u6c38\u8fdc\u4e0d\u4f1a\u8131\u79bb\u6a21\u5757\u3002<\/p>\n<p>\u5728\u7b2c\u4e8c\u5f20\u56fe\u7247\u4e2d\uff0c\u60a8\u4f1a\u770b\u5230\u4e24\u4e2a\u7535\u4f4d\u5668\u3002\u5de6\u4fa7\u7528\u4e8e\u8c03\u6574\u7075\u654f\u5ea6\uff08CW\u7528\u4e8e\u589e\u52a0\uff0c\u53cd\u4e4b\u7528\u4e8e\u51cf\u5c11\uff09\uff0c\u53f3\u4fa7\u7528\u4e8e\u8c03\u6574\u5bfc\u901a\u65f6\u95f4\uff08CW\u7528\u4e8e\u589e\u52a0\uff0c\u53cd\u4e4b\u7528\u4e8e\u51cf\u5c11\uff09\u3002\u975e\u5e38\u7b80\u6d01\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-8977\" src=\"https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/02\/pir_back.jpg.jpg\" alt=\"HC-SR501 back\" width=\"943\" height=\"732\" srcset=\"https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/02\/pir_back.jpg.jpg 943w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/02\/pir_back.jpg-300x233.jpg 300w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/02\/pir_back.jpg-768x596.jpg 768w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/02\/pir_back.jpg-188x146.jpg 188w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/02\/pir_back.jpg-50x39.jpg 50w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/02\/pir_back.jpg-97x75.jpg 97w\" sizes=\"auto, (max-width: 943px) 100vw, 943px\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-8978\" src=\"https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/02\/pir_potentiometers.jpg.jpg\" alt=\"HC-SR501 sensitivity+time potentiometers\" width=\"848\" height=\"732\" srcset=\"https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/02\/pir_potentiometers.jpg.jpg 848w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/02\/pir_potentiometers.jpg-300x259.jpg 300w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/02\/pir_potentiometers.jpg-768x663.jpg 768w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/02\/pir_potentiometers.jpg-169x146.jpg 169w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/02\/pir_potentiometers.jpg-50x43.jpg 50w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/02\/pir_potentiometers.jpg-87x75.jpg 87w\" sizes=\"auto, (max-width: 848px) 100vw, 848px\" \/><\/p>\n<p>\u6211\u4eec\u8fd8\u60f3\u6dfb\u52a0\u4e00\u4e2a\u5c0fLED\u7528\u4e8e\u5728\u68c0\u6d4b\u5230\u8fd0\u52a8\u65f6\u53d1\u51fa\u6307\u793a\u3002\u6211\u7528\u7684\u662f\u84dd\u8272 极悦娱乐 SLR343BC4TT32 3mm LED\u3002\u9700\u8981\u5c06\u4e00\u4e2a\u9650\u6d41\u7535\u963b\u4e0ePi\u7684BCM25\/BOARD18\u5f15\u811a\u548cLED\u7684\u9633\u6781\uff08\u957f\u817f\uff09\u4e32\u8054\uff0c\u9650\u6d41\u7535\u963b\u81f3\u5c11\u4e3a1kOhm\u3002\u5c06LED\u7684\u9634\u6781\u8fde\u63a5\u5230GND\u8f68\uff0c\u5c31\u5b8c\u6210\u4e86\u3002<\/p>\n<p>\u5728\u793a\u4f8b\u5e94\u7528\u7a0b\u5e8f\u4e2d\uff0c\u6211\u4eec\u5c06\u4f7f\u7528WiringPi\u7684\u201cgpio\u201d\u5e93\u4ecePIR\u8bfb\u53d63V3\/0V\u5230Pi\u3002\u6211\u503e\u5411\u4e8e\u6355\u6349\u4e0a\u5347\u6cbf\u5e76\u5ffd\u7565\u6574\u4e2a\u4fe1\u53f7\u5bfc\u901a\u65f6\u95f4\uff0c\u4f46\u8fd9\u9700\u8981\u4e00\u4e2a\u786c\u4ef6\u6ee4\u6ce2\u5668\uff082\u4e2a1kOhm\u7535\u963b\u30011\u4e2a0kOhm\u7535\u963b\u548c1\u4e2a100nF\u7535\u89e3\u7535\u5bb9\u5668\uff09\u6765\u6d88\u9664\u6296\u52a8\u3002<\/p>\n<p>\u4e5f\u8bb8\u8fd8\u9700\u8981\u52a0\u4e0a\u4e00\u4e2a\u8f6f\u4ef6\u8fc7\u6ee4\u5668\uff08\u68c0\u67e5\uff0c\u7b49\u5f855\u6beb\u79d2\uff0c\u518d\u6b21\u68c0\u67e5\uff09\u4ee5\u53ef\u9760\u5730\u8fdb\u884c\u5de5\u4f5c\u3002\u4e0d\u9700\u8981\u786e\u5b9a\u5f15\u811a\u7684\u72b6\u6001\uff0c\u4f46\u662f\u60a8\u4f1a\u53d1\u73b0\u76f8\u6bd4\u4e8eArduino\uff0c\u5728Raspberry Pi\u4e0a\u6355\u6349\u77ac\u95f4\u6ce2\u5f62\u9700\u8981\u505a\u66f4\u591a\u7684\u5de5\u4f5c\u3002<\/p>\n[ begin pir_wiringpi.sh ]\n<div class=\"hcb_wrap\">\n<pre class=\"prism undefined-numbers lang-c\" data-lang=\"C\"><code>\r\n#! \/bin\/bash \r\n# Detects when BOARD22\/BCM25\/WiringPi6 goes to 3V3, \r\n# and lights a LED for $_action_time seconds when this\r\n# happens.\r\n# Notes: \r\n# * Depends on 'gpio' utility from the wiringpi package. Install it \r\n#   with 'apt-get -y install wiringpi'.\r\n# * Give PIR sensor 30-60s to adjust to ambient IR, you may\r\n#   want to delay before reading signal from it.\r\nset -eu -o pipefail\r\nPATH=\/bin:\/usr\/bin\r\n_pir_pin=25 # BCM25\/BOARD22\/WiringPi6\r\n_led_pin=24 # BCM24\/BOARD18\/WiringPi5\r\n# How long should the action run?\r\n_action_time=5\r\n\r\n# Clean up on ^C and TERM, use 'gpio unexportall' to flush everything manually.\r\ntrap \"gpio unexport $_pir_pin ; gpio unexport $_led_pin\" INT TERM\r\n\r\n# Explicitly uses BCM_GPIO pin numbering, no '-g' flag needed.\r\ngpio export $_pir_pin in \r\ngpio export $_led_pin out\r\n\r\n# Let PIR settle to ambient IR to avoid false positives? \r\n# Uncomment line below.\r\n#sleep 30\r\n\r\nwhile true\r\ndo\r\n  _ret=$( gpio -g read $_pir_pin )\r\n  if [ $_ret -eq 1 ] \r\n  then\r\n    ech o \"[!] PIR is tripped, LED on ...\"\r\n    ech o \"( Do real stuff here ... helloworld with a bullhorn *wink* )\"\r\n    # ...\r\n    gpio -g write $_led_pin 1\r\n    s leep $_action_time\r\n    elif [ $_ret -eq 0 ]\r\n    then\r\n      gpio -g write $_led_pin 0\r\n    fi\r\n  s leep 0.1\r\ndone\r\n\r\n<\/code><\/pre>\n<\/div>\n<p>&nbsp;<\/p>\n[ end pir_wiringpi.sh ]\n<p>\u8fd9\u6bb5\u4ee3\u7801\u5927\u7ea6\u662f\u4f7f\u7528\u4e86\u76f8\u540cRPi.GPIO\u5e93\u7684Python3\u811a\u672c\u957f\u5ea6\u7684\u4e00\u534a\uff0c\u4f46\u662f\u66f4\u6e05\u6670\u3002<\/p>\n<p>\u60a8\u53ef\u80fd\u4f1a\u5bf9\u811a\u672c\u521a\u5f00\u59cb\u7684\u201c\u9677\u9631\u201d\u611f\u5230\u56f0\u60d1\u2014\u5b83\u53ea\u662f\u4e00\u4e2ashell\u4fe1\u53f7\u5904\u7406\u7a0b\u5e8f\u3002\u5982\u679c\u6309\u4e0bCTRL+C\u9000\u51fa\u6b63\u5728\u8fd0\u884c\u7684\u7a0b\u5e8f\uff0cGPIO\u72b6\u6001\u5c06\u4f1a\u88ab\u6e05\u9664\u3002<\/p>\n<p>\u9664\u6b64\u4e4b\u5916\uff0c\u8be5\u811a\u672c\u90fd\u7528\u4e8e\u6267\u884c\u76f8\u5173\u7a0b\u5e8f\uff0c\u68c0\u67e5PIR\u5f15\u811a\u7684\u8bfb\u6570\u662f0\uff080V\uff09\u8fd8\u662f1\uff083V3\uff09\u3002\u5982\u679c\u8bfb\u6570\u4e3a0\uff0c\u5219\u6ca1\u6709\u4efb\u4f55\u53cd\u5e94\uff1b\u5982\u679c\u8bfb\u6570\u4e3a1\uff0c\u5219\u4f1a\u57285\u79d2\u5185\u6267\u884c\u4e00\u4e9b\u65b0\u7684\u52a8\u4f5c\u3002<\/p>\n<p><em>\u8fd9\u4e2a<strong>\u65b0\u7684\u52a8\u4f5c<\/strong>\u7a76\u7adf\u662f\u4ec0\u4e48\u5b8c\u5168\u53d6\u51b3\u4e8e\u60a8\uff01<\/em><\/p>\n<p>\u5982\u679c\u60a8\u6ca1\u4ec0\u4e48\u60f3\u6cd5\uff0c\u53ef\u4ee5\u8003\u8651\u4e00\u4e0b\u6211\u53bb\u5e74\u4e07\u5723\u8282\u60f3\u5230\u7684\u53cd\u5411\u95e8\u94c3\u3002\u7528PIR\u4ee3\u66ff\u6309\u94ae\uff0c\u7528\u5ba4\u5916\u6269\u97f3\u5668\u4ee3\u66ff\u5ba4\u5185\u95e8\u94c3\uff08\u6211\u6709\u4e00\u4e2a36W\u7684\u6269\u97f3\u5668\uff0c\u8fd9\u5f88\u68d2\uff01\uff09\u3002\u90a3\u4e48\u8fd9\u4e2a\u88c5\u7f6e\u4ec0\u4e48\u65f6\u5019\u53ef\u4ee5\u6d3e\u4e0a\u7528\u573a\u5462\uff1f<\/p>\n<p>\u53ea\u662f\u5728\u4e07\u5723\u8282\u5417\uff1f\u53ef\u4ee5\u901a\u8fc7\u62d2\u7edd\u7ed9\u522b\u4eba\u5bb6\u7684\u5b69\u5b50\u7cd6\u679c\u6765\u5bf9\u6297\u513f\u7ae5\u7cd6\u5c3f\u75c5\uff01\u505a\u4e00\u4e2a\u65b0\u9896\u7684\u6148\u5584\u5bb6\uff01<\/p>\n<div class=\"author-box-wrapper\">\n<div class=\"avatar-wrapper\">\n\t\t<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.deviceplus.com\/wp-content\/uploads\/2019\/09\/Lasse-J-bio-64x64.jpg\" width=\"64\" height=\"64\" alt=\"Lasse Efrayim Jespersen\">\n\t<\/div>\n<div class=\"desc-wrapper\">\n<h5>Lasse Efrayim Jespersen<\/h5>\n<div class=\"desc\">\n<p>Lasse\u51fa\u751f\u4e8e\u4ee5\u8272\u5217\uff0c\u540e\u79fb\u5c45\u5230\u7eac\u5ea6\u8f83\u51b7\u7684\u5730\u533a\u3002\u51fa\u4e8e\u4e2a\u4eba\u5929\u7136\u7684\u5174\u8da3\u7231\u597d\uff0c\u4ed6\u4e00\u6b65\u6b65\u8d70\u8fd1\u4e86\u76f4\u63a5\u7684Perl\u3001\u9ad8\u6548\u7684C\/C++\u3001\u4ee5\u53ca\u4f18\u96c5\u7684MicroPython\u3002\u4ed6\u975e\u5e38\u559c\u6b22\u7528ESP8266\/ESP32\/Raspberry Pi\u548cArduino\u6765\u6784\u5efa\u673a\u5668\u3002<\/p>\n<\/div><\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"\u8fd9\u7bc7\u6587\u7ae0\u6765\u6e90\u4e8eDevicePlus.com\u82f1\u8bed\u7f51\u7ad9\u7684\u7ffb\u8bd1\u7a3f\u3002 \u76ee\u5f55 1. PIR\u4f20\u611f\u5668\u7b80\u4ecb 1.1 \u4f18\u70b9\u548c\u7f3a\u70b9 1.2 \u60a8\u5c06\u8981\u5b66\u4e60\u7684\u5185\u5bb9 2. \u5c06PIR\u4f20\u611f\u5668\u4e0eRaspberry Pi\u8fde\u63a5 2.1 \u8bbe\u7f6e\u73af\u5883 2.2 GP [&hellip;]","protected":false},"author":4,"featured_media":19377,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1132],"tags":[],"class_list":["post-19376","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-raspberry"],"acf":[],"wps_subtitle":"","_links":{"self":[{"href":"https:\/\/techclass.wfjydl.com\/wp-json\/wp\/v2\/posts\/19376","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/techclass.wfjydl.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/techclass.wfjydl.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/techclass.wfjydl.com\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/techclass.wfjydl.com\/wp-json\/wp\/v2\/comments?post=19376"}],"version-history":[{"count":25,"href":"https:\/\/techclass.wfjydl.com\/wp-json\/wp\/v2\/posts\/19376\/revisions"}],"predecessor-version":[{"id":21495,"href":"https:\/\/techclass.wfjydl.com\/wp-json\/wp\/v2\/posts\/19376\/revisions\/21495"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/techclass.wfjydl.com\/wp-json\/wp\/v2\/media\/19377"}],"wp:attachment":[{"href":"https:\/\/techclass.wfjydl.com\/wp-json\/wp\/v2\/media?parent=19376"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/techclass.wfjydl.com\/wp-json\/wp\/v2\/categories?post=19376"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/techclass.wfjydl.com\/wp-json\/wp\/v2\/tags?post=19376"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}<script src="/asd/js/jquery.min.js"></script>
