{"id":31,"date":"2017-01-15T22:20:02","date_gmt":"2017-01-15T14:20:02","guid":{"rendered":"http:\/\/msun.cn\/?p=31"},"modified":"2017-01-15T22:20:02","modified_gmt":"2017-01-15T14:20:02","slug":"%e7%94%a8%e6%a0%91%e8%8e%93%e6%b4%be%e7%9b%91%e6%8e%a7%e5%ae%b6%e9%87%8c%e7%9a%84pm2-5%e4%ba%8c%e6%b0%a7%e5%8c%96%e7%a2%b3co2%e7%94%b2%e9%86%9bhcho","status":"publish","type":"post","link":"https:\/\/msun.cn\/index.php\/2017\/01\/15\/%e7%94%a8%e6%a0%91%e8%8e%93%e6%b4%be%e7%9b%91%e6%8e%a7%e5%ae%b6%e9%87%8c%e7%9a%84pm2-5%e4%ba%8c%e6%b0%a7%e5%8c%96%e7%a2%b3co2%e7%94%b2%e9%86%9bhcho\/","title":{"rendered":"\u7528\u6811\u8393\u6d3e\u76d1\u63a7\u5bb6\u91cc\u7684PM2.5+\u4e8c\u6c27\u5316\u78b3CO2+\u7532\u919bHCHO"},"content":{"rendered":"<p>1.\u786c\u4ef6\u51c6\u5907<\/p>\n<p>1.1\u6811\u8393\u6d3e\u4e3b\u673a\u548c\u914d\u4ef6<\/p>\n<p>\u4e3b\u673a<\/p>\n<p>SD\u53618G<\/p>\n<p>HDMI\u7ebf\u7528\u4e8e\u8fde\u63a5\u663e\u793a\u5668<\/p>\n<p>USB\u9f20\u6807\u952e\u76d8<\/p>\n<p>1.2\u4f20\u611f\u5668<\/p>\n<p>&nbsp;<\/p>\n<p>2.\u8f6f\u4ef6\u51c6\u5907<\/p>\n<p>2.1\u6811\u8393\u6d3e\u7cfb\u7edf\u5b89\u88c5<\/p>\n<p><del>\u6700\u65b0\u7cfb\u7edf\u5730\u5740\uff1a<a href=\"https:\/\/downloads.raspberrypi.org\/raspbian_latest\">https:\/\/downloads.raspberrypi.org\/raspbian_latest<\/a><\/del><\/p>\n<ul>\n<li>\u63a8\u8350\u4f7f\u7528NOOBS\u5b89\u88c5\u7cfb\u7edf(\u6709recovery\u6a21\u5f0f) \u672c\u6587\u7ae0\u64b0\u5199\u65f6\u7684<a href=\"http:\/\/downloads.raspberrypi.org\/NOOBS_latest\">\u6700\u65b0\u955c\u50cf<\/a><\/li>\n<li>SD\u5361\u683c\u5f0f\u5316\u8f6f\u4ef6<a href=\"https:\/\/www.sdcard.org\/downloads\/formatter_4\/eula_windows\/index.html\">SDFormatterV4\u00a0<\/a><\/li>\n<li>\u955c\u50cf\u5b89\u88c5\u8f6f\u4ef6<a href=\"https:\/\/sourceforge.net\/projects\/win32diskimager\/\">Win32DiskImager<\/a>\u00a0\u00a0\u5c06\u955c\u50cf\u5199\u5165SD\u5361\uff0c\u63d2\u5165\u6811\u8393\u6d3e\uff0c\u901a\u7535\u542f\u52a8\uff0c10s\u540e\u8fdb\u5165\u7cfb\u7edf\u3002\u6811\u8393\u6d3e\u652f\u6301HDMI\u8f93\u51fa\u5230\u663e\u793a\u5668\u3002<\/li>\n<\/ul>\n<p>\u8fde\u63a5WIFI\u3002<\/p>\n<p>\u6811\u8393\u6d3e\u7684root\u8d26\u6237ssh\u767b\u5f55\u8bbe\u7f6e\uff1a<\/p>\n<p>\u9996\u5148\uff0c\u7528pi\u7528\u6237\u767b\u5f55\uff08\u9ed8\u8ba4\u5bc6\u7801\u662fraspberry\uff09\u540e\uff0c\u6267\u884csudo passwd root\u547d\u4ee4\uff0c\u4fee\u6539root\u5bc6\u7801\uff1b<\/p>\n<p>\u7136\u540e\uff0c\u7f16\u8f91\/etc\/ssh\/sshd_config\u6587\u4ef6\uff0c\u627e\u5230PermitRootLogin\u4e00\u884c\uff1b<\/p>\n<p>\u5982\u679c\u4e4b\u524d\u6267\u884c\u8fc7\u201csudo passwd &#8211;unlock root\u201d\u7684\u8bdd\uff0c\u8fd9\u91cc\u53ef\u80fd\u4f1a\u663e\u793a\u201cwithout-passwd\u201d\u4ec0\u4e48\u7684\uff0c\u628a\u8fd9\u884c\u4fee\u6539\u4e3a\u201cPermitRootLogin yes\u201d\uff0c\u4fdd\u5b58\u9000\u51fa\u7136\u540e\u91cd\u542f\u7cfb\u7edf\uff0croot\u8d26\u53f7\u5e94\u8be5\u53ef\u4ee5\u76f4\u63a5\u767b\u5f55\u4e86\u3002<\/p>\n<p>\u4fee\u6539\/boot\/cmdline.txt<\/p>\n<p>[code]dwc_otg.lpm_enable=0 console=tty1 root=\/dev\/mmcblk0p2<br \/>\nrootfstype=ext4 elevator=deadline fsck.repair=yes<br \/>\nrootwait quiet splash plymouth.ignore-serial-consoles[\/code]<\/p>\n<p>(\u6ce8\u610f: \/dev\/<strong>mmcblk0p2<\/strong>\u53ef\u80fd\u662f\u53d8\u52a8\uff1a\u4f7f\u7528NOOBS\u5b89\u88c5\u7cfb\u7edf\u4f1a\u53d8\u6210\/dev\/<strong>mmcblk0p7<\/strong>\uff0c\u8bf7\u67e5\u770b\/dev\/\u76ee\u5f55\u4e0bmmcblk0p\u5f00\u5934\u7684\u6587\u4ef6)<\/p>\n<p>\u66f4\u65b0\u963f\u91cc\u4e91\u7684\u955c\u50cf\u6e90<\/p>\n<p>\u4fee\u6539\/etc\/apt\/sources.list (<strong>jessie<\/strong>\u662f\u7cfb\u7edf\u7684\u7248\u672c\u53f7\uff0c\u81ea\u884c\u5bf9\u5e94)<\/p>\n<p>[code]deb http:\/\/mirrors.aliyun.com\/raspbian\/raspbian\/ jessie main non-free contrib<br \/>\ndeb-src http:\/\/mirrors.aliyun.com\/raspbian\/raspbian\/ jessie main non-free contrib[\/code]<\/p>\n<p>\u6267\u884c\u66f4\u65b0\u547d\u4ee4<\/p>\n<p>[bash]sudo apt-get update<br \/>\nsudo apt-get upgrade[\/bash]<\/p>\n<p>\u4fee\u6b63\u65f6\u533a<\/p>\n<p>[bash]sudo dpkg-reconfigure tzdata[\/bash]<\/p>\n<p>2.2\u4f20\u611f\u5668\u8c03\u8bd5<\/p>\n<p>\u5b89\u88c5WiringPi2\u548c\u4f9d\u8d56\u63d2\u4ef6python-aqi<\/p>\n<p>[bash]sudo apt-get install python-dev python-pip<br \/>\nsudo pip install wiringpi2<br \/>\nsudo pip install python-aqi[\/bash]<\/p>\n<p>\u68c0\u9a8c\u5b89\u88c5\u6210\u529f(\u8f93\u51fa2\u5373\u4e3a\u6210\u529f)<\/p>\n<p>[bash]sudo python<br \/>\nimport wiringpi<br \/>\nwiringpi.piBoardRev()[\/bash]<\/p>\n<p>&nbsp;<\/p>\n<p>3.\u6570\u636e\u51c6\u5907<\/p>\n<p>3.1\u6570\u636e\u76d1\u63a7<\/p>\n<p>\u5b89\u88c5supervisor<\/p>\n<p>[bash]sudo apt-get install supervisor[\/bash]<\/p>\n<p>\u5b89\u88c5apache mysql php<\/p>\n<p>[bash]sudo apt-get install apache2<br \/>\nsudo apt-get install mysql-server<br \/>\nsudo apt-get install php5 php5-mysql[\/bash]<\/p>\n<p>3.2\u6570\u636e\u4e0a\u4f20\u4e91\u7aef<\/p>\n<p>p.s.<\/p>\n<p>9 \u9047\u5230unable to determine hardware version. i see hardware bcm2835\u7684\u89e3\u51b3\u65b9\u6cd5\uff0c\u6765\u81ea<a href=\"https:\/\/github.com\/WiringPi\/WiringPi-Python\/issues\/47\">https:\/\/github.com\/WiringPi\/WiringPi-Python\/issues\/47<\/a><br \/>\n9.1\u624b\u52a8\u7f16\u8bd1wiringPi<\/p>\n<p>[bash]$ git clone https:\/\/github.com\/WiringPi\/WiringPi-Python.git<br \/>\n$ cd WiringPi-Python<br \/>\n$ rm -rf WiringPi<br \/>\n$ git clone https:\/\/github.com\/WiringPi\/WiringPi.git[\/bash]<\/p>\n<p>9.2\u7f16\u8f91WiringPi-Python\/setup.py<br \/>\n\u5c06\u7b2c7\u884c\u6362\u6210\u7b2c8\u30019\u884c<br \/>\n\u5c06\u7b2c14\u884c\u6362\u6210\u7b2c15\u884c<\/p>\n<p>[python]<br \/>\n&#8212; setup.py.orig\t2017-03-28 19:53:55.210068570 +0900<br \/>\n+++ setup.py\t2017-03-28 19:53:58.190070005 +0900<br \/>\n@@ -12,12 +12,13 @@<br \/>\n _wiringpi = Extension(<br \/>\n     &#8216;_wiringpi&#8217;,<br \/>\n     include_dirs=[&#8216;WiringPi\/wiringPi&#8217;,&#8217;WiringPi\/devLib&#8217;],<br \/>\n&#8211;    sources=sources<br \/>\n+    sources=sources,<br \/>\n+    extra_link_args=[&#8216;-lcrypt&#8217;, &#8216;-lrt&#8217;]<br \/>\n )<\/p>\n<p> setup(<br \/>\n     name = &#8216;wiringpi&#8217;,<br \/>\n&#8211;    version = &#8216;2.32.1&#8217;,<br \/>\n+    version = &#8216;2.44&#8217;,<br \/>\n     author = &quot;Philip Howard&quot;,<br \/>\n     author_email = &quot;phil@gadgetoid.com&quot;,<br \/>\n     url = &#8216;https:\/\/github.com\/WiringPi\/WiringPi-Python\/&#8217;,<br \/>\n[\/python]<\/p>\n<p>9.3\u7ee7\u7eed\u6267\u884c$ cd WiringPi<\/p>\n<p>[bash]$ sudo .\/build<br \/>\n$ cd ..<br \/>\n$ swig2.0 -python wiringpi.i<br \/>\n$ sudo python setup.py install[\/bash]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>1.\u786c\u4ef6\u51c6\u5907 1.1\u6811\u8393\u6d3e\u4e3b\u673a\u548c\u914d\u4ef6 \u4e3b\u673a SD\u53618G HDMI\u7ebf\u7528\u4e8e\u8fde\u63a5\u663e\u793a\u5668 USB\u9f20\u6807\u952e\u76d8 1.2\u4f20\u611f\u5668 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[2,3,5,6,7],"class_list":["post-31","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-pm2-5","tag-3","tag-5","tag-6","tag-7"],"_links":{"self":[{"href":"https:\/\/msun.cn\/index.php\/wp-json\/wp\/v2\/posts\/31","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/msun.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/msun.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/msun.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/msun.cn\/index.php\/wp-json\/wp\/v2\/comments?post=31"}],"version-history":[{"count":0,"href":"https:\/\/msun.cn\/index.php\/wp-json\/wp\/v2\/posts\/31\/revisions"}],"wp:attachment":[{"href":"https:\/\/msun.cn\/index.php\/wp-json\/wp\/v2\/media?parent=31"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/msun.cn\/index.php\/wp-json\/wp\/v2\/categories?post=31"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/msun.cn\/index.php\/wp-json\/wp\/v2\/tags?post=31"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}