{"id":24087,"date":"2023-09-20T00:00:57","date_gmt":"2023-09-19T16:00:57","guid":{"rendered":"https:\/\/techclass.wfjydl.com\/?p=24087"},"modified":"2026-05-19T13:41:33","modified_gmt":"2026-05-19T05:41:33","slug":"%e4%bd%bf%e7%94%a8%e5%b0%8f%e5%b7%a7%e7%9a%84raspberry-pi-zero%e5%88%b6%e4%bd%9c%e7%a7%bb%e5%8a%a8%e8%ae%be%e5%a4%87%ef%bc%81-%e7%ac%ac4%e7%af%87%ef%bc%9a%e5%88%b6%e4%bd%9c%e5%b0%8f%e5%b1%8f%e6%99%ba","status":"publish","type":"post","link":"https:\/\/techclass.wfjydl.com\/knowledge\/tech-info\/raspberry\/raspberrypi_zero_04","title":{"rendered":"\u4f7f\u7528\u5c0f\u5de7\u7684Raspberry Pi Zero\u5236\u4f5c\u79fb\u52a8\u8bbe\u5907\uff01  \u7b2c4\u7bc7\uff1a\u5236\u4f5c\u5c0f\u5c4f\u667a\u80fd\u624b\u8868\uff01"},"content":{"rendered":"<p>&nbsp;<\/p>\n<p>\u7b2c1\u7bc7\uff1a<a href=\"https:\/\/techclass.wfjydl.com\/knowledge\/tech-info\/raspberry\/raspberrypi_zero_01\/\">\u4f7f\u7528Raspberry Pi Zero\u548cRaspberry Pi Hat\u8f7b\u677e\u8fdb\u884c\u7535\u5b50\u5236\u4f5c\uff01<\/a><br \/>\n\u7b2c2\u7bc7\uff1a<a href=\"https:\/\/techclass.wfjydl.com\/knowledge\/tech-info\/raspberry\/raspberrypi_zero_02\/\">\u4f7f\u7528Grove\u4f20\u611f\u5668\u5236\u4f5c\u73af\u5883\u68c0\u6d4b\u8bbe\u5907\uff01<\/a><br \/>\n\u7b2c3\u7bc7\uff1a<a href=\"https:\/\/techclass.wfjydl.com\/knowledge\/tech-info\/raspberry\/raspberrypi_zero_03\/\">\u5236\u4f5c\u58f0\u63a7\u591a\u529f\u80fd\u9065\u63a7\u5668\uff01<\/a><\/p>\n<p>&nbsp;<\/p>\n<p>\u5927\u5bb6\u597d\u3002\u6211\u662f\u5409\u7530\uff01\u8fd9\u662f\u4f7f\u7528Raspberry Pi Zero\u8fdb\u884c\u7535\u5b50\u5236\u4f5c\u7684\u7b2c4\u7bc7\u3002\u5728\u672c\u9879\u76ee\u4e2d\uff0c\u9664\u4e86\u4e4b\u524d\u7684\u9879\u76ee\u4e2d\u7528\u5230\u7684\u4f20\u611f\u5668\u548c\u9065\u63a7\u5668\u529f\u80fd\u4e4b\u5916\uff0c\u6211\u8fd8\u5c06\u6dfb\u52a0\u4e00\u4e2a\u5c0f\u5de7\u7684\u663e\u793a\u5c4f\uff0c\u5236\u4f5c\u4e00\u6b3e\u53ef\u4ee5\u652f\u6301\u8bed\u97f3\u63a7\u5236\u529f\u80fd\u7684\u667a\u80fd\u624b\u8868\u3002\u5f53\u6211\u4eec\u5411\u624b\u8868\u53d1\u51fa\u8bed\u97f3\u6307\u793a\uff0c\u5c31\u80fd\u8fdb\u884c\u4f20\u611f\u5668\u68c0\u6d4b\u6216\u8005\u9065\u63a7\u64cd\u4f5c\uff0c\u8fd9\u6837\u7684\u4e00\u6b3e\u5c0f\u8bbe\u5907\u662f\u4e0d\u662f\u6781\u5177\u672a\u6765\u611f\u5440\uff01<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-24701\" src=\"https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2026\/04\/1-1.png\" sizes=\"auto, (max-width: 679px) 100vw, 679px\" srcset=\"https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2026\/04\/1-1.png 679w, https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2026\/04\/1-1.png 300w\" alt=\"1\" width=\"679\" height=\"500\" \/><\/p>\n<p>&nbsp;<\/p>\n<div class=\"box-red-01\">\n<h4>\u672c\u9879\u76ee\u6240\u9700\u90e8\u4ef6<\/h4>\n<p><a href=\"https:\/\/www.amazon.co.jp\/Raspberry-Pi-Zero-Starter-Kit\/dp\/B0746H9881\/ref=as_li_ss_tl?__mk_ja_JP=%E3%82%AB%E3%82%BF%E3%82%AB%E3%83%8A&amp;keywords=raspberry+pi+zero&amp;qid=1554060190&amp;s=gateway&amp;sr=8-7&amp;linkCode=sl1&amp;tag=ktrip-22&amp;linkId=6a28a304329d9bd713ee81c88d2a9c57&amp;language=ja_JP\" target=\"_blank\" rel=\"noopener\"><strong>\u30fbRaspberry Pi Zero<\/strong><\/a><br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-22898 alignnone\" src=\"https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2026\/04\/2-1.png\" sizes=\"auto, (max-width: 400px) 100vw, 400px\" srcset=\"https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2026\/04\/2-1.png 400w, https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2026\/04\/2-1.png 300w\" alt=\"2\" width=\"400\" height=\"218\" \/><\/p>\n<p><a href=\"https:\/\/www.amazon.co.jp\/ReSpeaker-%E6%8B%A1%E5%BC%B5%E3%83%9C%E3%83%BC%E3%83%89-%E3%82%B5%E3%82%A6%E3%83%B3%E3%83%89%E3%82%AB%E3%83%BC%E3%83%89-Raspberry-%E4%BA%8C%E3%81%A4%E3%81%AE%E3%83%9E%E3%82%A4%E3%82%AF%E3%81%A4%E3%81%8D2-Mics\/dp\/B07GY9YPHR\/ref=as_li_ss_tl?__mk_ja_JP=%E3%82%AB%E3%82%BF%E3%82%AB%E3%83%8A&amp;keywords=Seeed+ReSpeaker+Mic&amp;qid=1554060353&amp;s=gateway&amp;sr=8-4-fkmrnull&amp;linkCode=sl1&amp;tag=ktrip-22&amp;linkId=3f835c6cf48a7de871b4bc6a77445fd8&amp;language=ja_JP\" target=\"_blank\" rel=\"noopener\"><strong>\u30fbSeeed ReSpeaker 2-Mics Hat<\/strong><\/a><br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-22899 alignnone\" src=\"https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2026\/04\/3-1.png\" sizes=\"auto, (max-width: 400px) 100vw, 400px\" srcset=\"https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2026\/04\/3-1.png 400w, https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2026\/04\/3-1.png 300w\" alt=\"3\" width=\"400\" height=\"245\" \/><\/p>\n<p><strong>\u30fbGrove OLED\u663e\u793a\u5c4f\uff08\u5c4f\u5e55\u5c3a\u5bf8\u4e0d\u540c\uff0c\u8bf7\u81ea\u884c\u9009\u62e9\u5176\u4e2d\u4e00\u6b3e\uff09<\/strong><\/p>\n<table>\n<tbody>\n<tr style=\"border-style: none;\">\n<td style=\"border-style: none;\" align=\"center\"><a href=\"https:\/\/www.marutsu.co.jp\/pc\/i\/829297\/\" target=\"_blank\" rel=\"noopener\">GROVE OLED 128\u00d764<\/a><\/td>\n<td style=\"border-style: none;\" align=\"center\"><a href=\"https:\/\/www.marutsu.co.jp\/pc\/i\/829300\/\" target=\"_blank\" rel=\"noopener\">GROVE OLED 96\u00d796<\/a><\/td>\n<\/tr>\n<tr style=\"border-style: none;\">\n<td style=\"border-style: none;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-24720\" src=\"https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2026\/04\/zero_b.png\" sizes=\"auto, (max-width: 250px) 100vw, 250px\" srcset=\"https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2026\/04\/zero_b.png 250w, https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2026\/04\/zero_b.png 150w\" alt=\"zero_b\" width=\"250\" height=\"250\" \/><\/td>\n<td style=\"border-style: none;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-24721\" src=\"https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2026\/04\/zero_a.png\" sizes=\"auto, (max-width: 250px) 100vw, 250px\" srcset=\"https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2026\/04\/zero_a.png 250w, https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2026\/04\/zero_a.png 150w\" alt=\"zero_a\" width=\"250\" height=\"250\" \/><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><strong>\u30fbGrove\u4f20\u611f\u5668\u3001\u7ea2\u5916\u7ebf\u76f8\u5173\u90e8\u4ef6\uff08\u8bf7\u6839\u636e\u81ea\u5df1\u60f3\u6d4b\u91cf\u7684\u9879\u76ee\u4ee5\u53ca\u4f7f\u7528\u65b9\u5f0f\u81ea\u884c\u9009\u62e9\uff09<\/strong><\/p>\n<table>\n<tbody>\n<tr style=\"border-style: none;\">\n<td style=\"border-style: none;\" align=\"center\"><a href=\"https:\/\/www.marutsu.co.jp\/pc\/i\/829297\/\" target=\"_blank\" rel=\"noopener\">Grove\u7ea2\u5916\u4fe1\u53f7\u53d1\u5c04LED<\/a><\/td>\n<td style=\"border-style: none;\" align=\"center\"><a href=\"https:\/\/www.marutsu.co.jp\/pc\/i\/829300\/\" target=\"_blank\" rel=\"noopener\">Grove \u6e29\u6e7f\u5ea6\u4f20\u611f\u5668<\/a><\/td>\n<td style=\"border-style: none;\" align=\"center\"><a href=\"https:\/\/www.marutsu.co.jp\/pc\/i\/829300\/\" target=\"_blank\" rel=\"noopener\">Grove\u8fdc\u7ea2\u5916\u7ebf\u53cd\u5c04\u4f20\u611f\u5668<\/a><\/td>\n<\/tr>\n<tr style=\"border-style: none;\">\n<td style=\"border-style: none;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-24761\" src=\"https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2026\/04\/3a.png\" alt=\"3a\" width=\"150\" height=\"150\" \/><\/td>\n<td style=\"border-style: none;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-24762\" src=\"https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2026\/04\/3b.png\" alt=\"3b\" width=\"150\" height=\"150\" \/><\/td>\n<td style=\"border-style: none;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-24763\" src=\"https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2026\/04\/3c.png\" alt=\"3c\" width=\"150\" height=\"150\" \/><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><strong>\u30fb\u667a\u80fd\u624b\u8868\u5916\u58f3\uff08<a href=\"https:\/\/www.marutsu.co.jp\/pc\/i\/68862\/\" target=\"_blank\" rel=\"noopener\">\u7845\u80f6\u5957<\/a>\u7b49\uff09<\/strong><br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-24739 alignnone\" src=\"https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2026\/04\/zero-4a.png\" alt=\"zero-4a\" width=\"153\" height=\"250\" \/><\/p>\n<p><a href=\"https:\/\/www.sengoku.co.jp\/mod\/sgk_cart\/detail.php?code=EEHD-4YZM\" target=\"_blank\" rel=\"noopener\"><strong>\u30fb\u5c0f\u578b\u9502\u805a\u5408\u7269\u7535\u6c60<\/strong><\/a><br \/>\n\uff08\u203b\u6ce8\u610f\uff1a\u8bf7\u5c0f\u5fc3\u5904\u7406\uff0c\u4f7f\u7528\u98ce\u9669\u81ea\u8d1f\u3002\uff09<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-22655 alignnone\" src=\"https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2026\/04\/zero-4b.png\" alt=\"zero-4b\" width=\"260\" height=\"193\" \/><\/p>\n<p><a href=\"https:\/\/www.sengoku.co.jp\/mod\/sgk_cart\/detail.php?code=EEHD-4WYU\" target=\"_blank\" rel=\"noopener\"><strong>\u30fb\u5e26\u5f00\u5173\u7684\u5206\u7ebf\u677f<\/strong><\/a><br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-24726 alignnone\" src=\"https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2026\/04\/zero-5.png\" alt=\"zero-5\" width=\"300\" height=\"188\" \/><\/p>\n<p>&nbsp;<\/p>\n<h4>\u76ee\u5f55<\/h4>\n<p><strong>1. \u5728Raspberry Pi Zero\u4e0a\u5b89\u88c5\u6709\u673aEL\u663e\u793a\u5c4f<\/strong><br \/>\n<strong>2. \u5b9e\u73b0\u663e\u793a\u5c4f\u4e0e\u4f20\u611f\u5668\u3001\u7ea2\u5916\u7ebf\u7b49\u90e8\u4ef6\u4e4b\u95f4\u7684\u8054\u52a8<\/strong><br \/>\n<strong>3. \u5236\u4f5c\u652f\u6301\u8bed\u97f3\u63a7\u5236\u529f\u80fd\u7684\u667a\u80fd\u624b\u8868<\/strong><br \/>\n<strong>4. \u603b\u7ed3<\/strong><\/p>\n<\/div>\n<h2>1.\u5728Raspberry Pi Zero\u4e0a\u5b89\u88c5\u6709\u673aEL\u663e\u793a\u5c4f<\/h2>\n<p>\u4e3a\u4e86\u7ed9Raspberry Pi Zero\u6dfb\u52a0\u4e00\u5757\u663e\u793a\u5c4f\uff0c\u672c\u9879\u76ee\u4e2d\u5c06\u7528\u5230\u7684\u662fGrove\u7684\u6709\u673aEL\u663e\u793a\u5c4f\uff0c\u6b64\u7c7b\u663e\u793a\u5c4f\u4f7f\u7528\u8d77\u6765\u975e\u5e38\u4fbf\u5229\u3002\u5e26Grove\u8fde\u63a5\u7ebf\u7684\u6709\u673aEL\u663e\u793a\u5c4f\u6709\u4e24\u6b3e\uff1a\u5c3a\u5bf8\u4e3a128\u00d764\u7684OLED\u6a2a\u5c4f\u548c\u5c3a\u5bf8\u4e3a96\u00d796\u7684\u65b9\u5c4f\uff0c\u5728Seeed\u516c\u53f8\u7684<a href=\"http:\/\/wiki.seeedstudio.com\/Grove-OLED_Display_0.96inch\/\" target=\"_blank\" rel=\"noopener\">Wiki<\/a>\u7f51\u9875\u4e0a\u6709\u8be6\u7ec6\u7684\u4f7f\u7528\u65b9\u6cd5\u4ecb\u7ecd\u3002<\/p>\n<p><a href=\"http:\/\/wiki.seeedstudio.com\/Grove-OLED_Display_0.96inch\/\" target=\"_blank\" rel=\"noopener\">Grove OLED 128 x 64 \u663e\u793a\u5c4f<\/a><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-24720 alignnone\" src=\"https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2026\/04\/b-2.png\" sizes=\"auto, (max-width: 250px) 100vw, 250px\" srcset=\"https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2026\/04\/b-2.png 250w, https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2026\/04\/b-2.png 150w\" alt=\"b\" width=\"250\" height=\"250\" \/><\/p>\n<p>\u4e3a\u4e86\u6b63\u5e38\u4f7f\u7528\u8fd9\u6b3e\u663e\u793a\u5c4f\uff0c\u6211\u4eec\u9700\u8981\u7528\u5230\u6211\u4eec\u7684\u8001\u670b\u53cb\u2014\u2014ReSpeaker\u7684\u652f\u6301I2C\u8fde\u63a5\u7684\u7aef\u53e3\uff0c\u8be5\u7aef\u53e3\u4f4d\u4e8eReSpeaker\u7684\u8fb9\u4e0a\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-24727 alignnone\" src=\"https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2026\/04\/zero-7.png\" sizes=\"auto, (max-width: 550px) 100vw, 550px\" srcset=\"https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2026\/04\/zero-7.png 550w, https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2026\/04\/zero-7.png 300w\" alt=\"zero-7\" width=\"550\" height=\"332\" \/><\/p>\n<p>\u5c06\u663e\u793a\u5c4f\u7684Grove\u8fde\u63a5\u7ebf\u63d2\u5165ReSpeaker\u8fb9\u4e0a\u7684\u7aef\u53e3\uff0c\u63a5\u901a\u7535\u6e90\u3002<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-24728 alignnone\" src=\"https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2026\/04\/zero-8.png\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" srcset=\"https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2026\/04\/zero-8.png 500w, https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2026\/04\/zero-8.png 300w\" alt=\"zero-8\" width=\"500\" height=\"478\" \/><\/p>\n<p>\u8981\u60f3\u5728Raspberry Pi\u4e0a\u4f7f\u7528\u8fd9\u5757\u663e\u793a\u5c4f\uff0c\u9996\u5148\u9700\u8981\u901a\u8fc7raspi-config\uff0c\u542f\u7528\u201cI2C\u201d\u8fd9\u4e00\u8fde\u63a5\u65b9\u5f0f\u3002<br \/>\n\u6b64\u5916\uff0c\u5728Raspberry Pi\u4e0a\u4f7f\u7528Grove\uff0c\u8fd8\u9700\u8981\u4e0b\u8f7d\u5e93\u6587\u4ef6grove.py\uff0c\u6211\u4eec\u5728\u672c\u7cfb\u5217\u8fde\u8f7d\u7684<a href=\"https:\/\/techclass.wfjydl.com\/knowledge\/tech-info\/raspberry\/raspberrypi_zero_02\/\">Grove\u4f20\u611f\u5668\u7684\u5e94\u7528\u9879\u76ee\uff08\u7b2c2\u7bc7\uff09<\/a>\u4e2d\u4e5f\u7528\u5230\u4e86\u8fd9\u4e00\u5e93\u6587\u4ef6\u3002\u5148\u901a\u8fc7\u4e0b\u8ff0Github\u5e73\u53f0\uff0c\u4e0b\u8f7dgrove.py\uff0c\u7136\u540e\u901a\u8fc7Python3\u4e0b\u8f7d\u7a0b\u5e8f\u7fa4\u7ec4\u3002<\/p>\n<div class=\"box-grey-01\">$ sudo raspi-config # \u901a\u8fc7Interfacing menu\u542f\u7528I2C<br \/>\n$ git clone https:\/\/github.com\/Seeed-Studio\/grove.py<br \/>\n$ cd grove.py<br \/>\n$ sudo pip3 install .<br \/>\n$ cd grove<\/div>\n<p>\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u5728\u540d\u4e3a\u201cgrove\u201d\u7684\u6587\u4ef6\u5939\u4e2d\uff0c\u6709\u5982\u4e0b\u6240\u793a\u7684\u5404\u79cd\u7a0b\u5e8f\u3002\u56e0\u4e3a\u672c\u9879\u76ee\u8981\u4f7f\u7528OLED\u663e\u793a\u5c4f\uff0c\u6240\u4ee5\u6211\u4eec\u8981\u4f7f\u7528\u5176\u4e2d\u7684\u201cgrove_oled_display_128x64.py\u201d\u8fd9\u4e00\u7a0b\u5e8f\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-24729 alignnone\" src=\"https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2026\/04\/zero-9.png\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" srcset=\"https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2026\/04\/zero-9.png 600w, https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2026\/04\/zero-9.png 300w\" alt=\"zero-9\" width=\"600\" height=\"420\" \/><\/p>\n<p>\u63a5\u4e0b\u6765\u8bdd\u4e0d\u591a\u8bf4\uff0c\u6211\u4eec\u901a\u8fc7python3\u547d\u4ee4\u6765\u8fd0\u884c\u8fd9\u4e00\u7a0b\u5e8f\u3002<\/p>\n<div class=\"box-grey-01\">$ python3 grove_oled_display_128x64.py<\/div>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-24730 alignnone\" src=\"https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2026\/04\/zero-10.png\" sizes=\"auto, (max-width: 550px) 100vw, 550px\" srcset=\"https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2026\/04\/zero-10.png 550w, https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2026\/04\/zero-10.png 300w\" alt=\"zero-10\" width=\"550\" height=\"456\" \/><br \/>\n\u5c31\u8fd9\u6837\uff0c\u663e\u793a\u5c4f\u4e0a\u51fa\u73b0\u4e86\u201cHello World\u201d\u8fd9\u4e00\u663e\u793a\u793a\u4f8b\uff0c\u662f\u4e0d\u662f\u5f88\u7b80\u5355\u5462\uff1f<\/p>\n<h2>2.\u5b9e\u73b0\u663e\u793a\u5c4f\u4e0e\u4f20\u611f\u5668\u3001\u7ea2\u5916\u7ebf\u7b49\u90e8\u4ef6\u4e4b\u95f4\u7684\u8054\u52a8\uff0c\u63d0\u9ad8\u4f7f\u7528\u4fbf\u5229\u6027<\/h2>\n<p>\u63a5\u4e0b\u6765\uff0c\u6211\u4eec\u5c31\u8981\u901a\u8fc7\u8fd9\u5757\u5b89\u88c5\u5b8c\u6210\u7684\u663e\u793a\u5c4f\uff0c\u6765\u663e\u793a\u5404\u79cd\u4fe1\u606f\u4e86\u3002\u9996\u5148\uff0c\u8981\u8ba9\u5b83\u50cf\u624b\u8868\u4e00\u6837\u663e\u793a\u5f53\u524d\u65f6\u523b\u3002\u5148\u590d\u5236\u521a\u521a\u7528\u5230\u7684\u793a\u4f8b\u7a0b\u5e8f\uff0c\u4ee5\u7c7b\u4f3c\u4e8e\u201cgrove_oled_time.py\u201d\u8fd9\u6837\u7684\u540d\u79f0\uff0c\u653e\u5165\u76f8\u5e94\u7684\u6587\u4ef6\u5939\u5185\uff08\u672c\u9879\u76ee\u4e2d\u662fPrograms\/watch\uff09\uff0c\u7136\u540e\u5728\u5728\u5176\u4e0b\u8ff0main\u7a0b\u5e8f\u4e2d\u6dfb\u52a0\u663e\u793a\u5f53\u524d\u65f6\u523b\u7684\u51fd\u6570\u3002<\/p>\n<div class=\"box-grey-01\">$ sudo cp ~\/grove.py\/grove\/grove_oled_display_128x64.py ~\/Programs\/watch\/grove_oled_time.py<br \/>\n$ sudo vi ~\/Programs\/watch\/grove_oled_time.py<\/div>\n[grove_oled_time.py\uff08\u6dfb\u52a0\u4e0b\u8ff0\u7ea2\u6846\u90e8\u5206\u7684\u51fd\u6570\uff0c\u7528\u6765\u663e\u793a\u65f6\u95f4\uff09]\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-24731 alignnone\" src=\"https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2026\/04\/zero-11.png\" sizes=\"auto, (max-width: 550px) 100vw, 550px\" srcset=\"https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2026\/04\/zero-11.png 550w, https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2026\/04\/zero-11.png 300w\" alt=\"zero-11\" width=\"550\" height=\"263\" \/><\/p>\n<p>\u8fd0\u884c\u201cgrove_oled_time.py\u201d\uff0c\u5e94\u8be5\u5c31\u4f1a\u5982\u540c\u4e0b\u8ff0\u7167\u7247\u4e00\u6837\uff0c\u5728\u663e\u793a\u5c4f\u4e0a\u663e\u793a\u51fa\u5f53\u524d\u7684\u65e5\u671f\u548c\u65f6\u95f4\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-24732 alignnone\" src=\"https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2026\/04\/zero-12.png\" sizes=\"auto, (max-width: 550px) 100vw, 550px\" srcset=\"https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2026\/04\/zero-12.png 550w, https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2026\/04\/zero-12.png 300w\" alt=\"zero-12\" width=\"550\" height=\"457\" \/><\/p>\n<p>\u63a5\u4e0b\u6765\uff0c\u6211\u4eec\u5c31\u8981\u5c06<a href=\"https:\/\/techclass.wfjydl.com\/knowledge\/tech-info\/raspberry\/raspberrypi_zero_02\/\">\u672c\u7cfb\u5217\u8fde\u8f7d\u7b2c2\u7bc7\u4e2d\u7528\u5230\u7684\u6e29\u6e7f\u5ea6\u4f20\u611f\u5668<\/a>\u63d2\u5165\u4f4d\u4e8e\u6b63\u4e2d\u95f4\u7684Grove\u7aef\u53e3\uff0c\u5728\u663e\u793a\u5c4f\u4e0a\u663e\u793a\u6e29\u5ea6\u548c\u6e7f\u5ea6\u4fe1\u606f\u4e86\u3002\u6b64\u65f6\uff0c\u9700\u8981\u5bf9grove_oled\u7a0b\u5e8f\u8fdb\u884c\u4fee\u6539\u7684\u90e8\u5206\u5982\u4e0b\uff08\u9ec4\u8272\u90e8\u5206\uff09\u3002<\/p>\n<div class=\"box-grey-01\">$ cd ~\/Programs\/watch<br \/>\n$ sudo cp grove_oled_display_time.py grove_oled_temp.py<br \/>\n$ sudo vi grove_oled_temp.py<\/div>\n<p># \u5e93\u6587\u4ef6\u7684\u5bfc\u5165<\/p>\n<pre class=\"crayon-plain-tag\">from grove.grove_temperature_humidity_sensor import DHT\r\n# DHT11 type\r\ndht11 = DHT(\"11\", 12)\r\n\r\n\u2026\r\n\r\n# \u4e3b\u7a0b\u5e8f\u4e2d\r\ndef main():\r\ndisplay = GroveOledDisplay128x64()\r\n\r\nwhile True:\r\n\u2026\r\nhumi, temp = dht11.read()\r\nprint('DHT{0}, humidity {1:.1f}%, temperature {2:.1f}*'.format(dht11.dht_type, humi, temp))\r\ndisplay.set_cursor(4, 1)\r\ndisplay.puts('Humid: ' + str(humi) + ' %')\r\ndisplay.set_cursor(5, 1)\r\ndisplay.puts('Temp: ' + str(temp) + ' C')\r\n\r\n<\/pre>\n<style>#file-grove_oled_temp-py-LC1,#file-grove_oled_temp-py-LC2,#file-grove_oled_temp-py-LC3,#file-grove_oled_temp-py-LC4,#file-grove_oled_temp-py-LC5,#file-grove_oled_temp-py-LC6,#file-grove_oled_temp-py-LC7,#file-grove_oled_temp-py-LC8,#file-grove_oled_temp-py-LC14,#file-grove_oled_temp-py-LC15,#file-grove_oled_temp-py-LC16,#file-grove_oled_temp-py-LC17,#file-grove_oled_temp-py-LC18,#file-grove_oled_temp-py-LC19{background:#F3F781}<br \/><\/style>\n<p>\u8fd0\u884c\u4e0a\u8ff0\u201cgrove_oled_temp.py\u201d\u7a0b\u5e8f\u4e4b\u540e\uff0c\u5982\u4e0b\u56fe\u6240\u793a\uff0c\u663e\u793a\u5c4f\u4e0a\u5c31\u4f1a\u5f00\u59cb\u663e\u793a\u623f\u95f4\u4e2d\u7684\u6e7f\u5ea6\u548c\u6e29\u5ea6\u4fe1\u606f\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-24733 alignnone\" src=\"https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2026\/04\/zero-13.png\" sizes=\"auto, (max-width: 550px) 100vw, 550px\" srcset=\"https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2026\/04\/zero-13.png 550w, https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2026\/04\/zero-13.png 300w\" alt=\"zero-13\" width=\"550\" height=\"155\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-24734 alignnone\" src=\"https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2026\/04\/zero-14.png\" sizes=\"auto, (max-width: 550px) 100vw, 550px\" srcset=\"https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2026\/04\/zero-14.png 550w, https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2026\/04\/zero-14.png 300w\" alt=\"zero-14\" width=\"550\" height=\"292\" \/><\/p>\n<p>\u7136\u540e\uff0c\u518d\u5b89\u88c5<a href=\"https:\/\/techclass.wfjydl.com\/knowledge\/tech-info\/raspberry\/raspberrypi_zero_03\/\">\u672c\u7cfb\u5217\u8fde\u8f7d\u7b2c3\u7bc7\u4e2d\u7528\u5230\u7684\u7ea2\u5916\u4fe1\u53f7\u53d1\u5c04LED<\/a>\uff0c\u5728\u663e\u793a\u5c4f\u4e0a\u663e\u793a\u5176\u7ed3\u679c\u3002\u8bf7\u5148\u53c2\u7167<a href=\"https:\/\/techclass.wfjydl.com\/knowledge\/tech-info\/raspberry\/raspberrypi_zero_03\/\">\u672c\u7cfb\u5217\u8fde\u8f7d\u4e2d\u7684\u4e0a\u4e00\u7bc7\u6587\u7ae0<\/a>\uff0c\u5b8c\u6210\u7ea2\u5916\u7ebf\u4fe1\u53f7\u7684\u6dfb\u52a0\u548c\u8fd0\u884c\u76f8\u5173\u7684\u8bbe\u7f6e\u3002<\/p>\n<div class=\"box-grey-01\">$ sudo cp grove_oled_display_time.py grove_oled_ir.py<br \/>\n$ sudo vi grove_oled_ir.py<\/div>\n<pre class=\"crayon-plain-tag\"># \u5e93\u6587\u4ef6\u7684\u5bfc\u5165\r\nimport RPi.GPIO as GPIO\r\nimport subprocess\r\nBUTTON = 17\r\nGPIO.setmode(GPIO.BCM)\r\nGPIO.setup(BUTTON, GPIO.IN)\r\n\r\n\u2026\r\n\r\n# \u4e3b\u7a0b\u5e8f\u4e2d\r\ndef main():\r\ndisplay = GroveOledDisplay128x64()\r\n\r\nwhile True:\r\n\u2026\r\nstate = GPIO.input(BUTTON)\r\ndisplay.set_cursor(4, 1)\r\ndisplay.puts('Irsend: ')\r\ndisplay.set_cursor(5, 1)\r\nif state:\r\nprint(\u2018No IR\u2019)\r\ndisplay.puts('No IR')\r\nelse:\r\nsubprosess.Popen(\u201dirsend SEND_ONCE remotetv on\u201d)\r\nprint(\u2018RemoteTV On\u2019)\r\ndisplay.puts('remotetv on')\r\n\r\n<\/pre>\n<style>#file-grove_oled_ir-py-LC1,#file-grove_oled_ir-py-LC2,#file-grove_oled_ir-py-LC3,#file-grove_oled_ir-py-LC4,#file-grove_oled_ir-py-LC5,#file-grove_oled_ir-py-LC6,#file-grove_oled_ir-py-LC7,#file-grove_oled_ir-py-LC8,#file-grove_oled_ir-py-LC9,#file-grove_oled_ir-py-LC10,#file-grove_oled_ir-py-LC16,#file-grove_oled_ir-py-LC17,#file-grove_oled_ir-py-LC18,#file-grove_oled_ir-py-LC19,#file-grove_oled_ir-py-LC20,#file-grove_oled_ir-py-LC21,#file-grove_oled_ir-py-LC22,#file-grove_oled_ir-py-LC23,#file-grove_oled_ir-py-LC24,#file-grove_oled_ir-py-LC25,#file-grove_oled_ir-py-LC26{background:#F3F781}<br \/><\/style>\n<p>\u5b8c\u6210\u4e4b\u540e\uff0c\u8fd0\u884c\u7a0b\u5e8f\uff0c\u6309\u4e0bReSpeaker\u4e0a\u7684\u6309\u94ae\uff0c\u5c31\u4f1a\u53d1\u51fa\u7ea2\u5916\u7ebf\u4fe1\u53f7\uff08\u7535\u89c6\u673a\u7684\u9065\u63a7\u53d8\u4e3aON\u7684\u72b6\u6001\uff09\uff0c\u663e\u793a\u5c4f\u4e0a\u5c31\u4f1a\u663e\u793a\u201cRemoteTV ON\u201d\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-24735\" src=\"https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2026\/04\/zero-15.png\" sizes=\"auto, (max-width: 550px) 100vw, 550px\" srcset=\"https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2026\/04\/zero-15.png 550w, https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2026\/04\/zero-15.png 300w\" alt=\"zero-15\" width=\"550\" height=\"288\" \/><\/p>\n<h2>3.\u5236\u4f5c\u652f\u6301\u8bed\u97f3\u63a7\u5236\u529f\u80fd\u7684\u667a\u80fd\u624b\u8868<\/h2>\n<p>\u6700\u540e\uff0c\u6211\u4eec\u5c31\u8981\u548c\u8bed\u97f3\u63a7\u5236\u529f\u80fd\u8fdb\u884c\u8054\u52a8\uff0c\u5c06\u5176\u5236\u4f5c\u6210\u5e38\u89c4\u624b\u8868\u5f0f\u6837\u7684\u667a\u80fd\u624b\u8868\u3002<\/p>\n<p>\u8bf7\u53c2\u7167<a href=\"https:\/\/techclass.wfjydl.com\/knowledge\/tech-info\/raspberry\/raspberrypi_zero_03\/\">\u672c\u7cfb\u5217\u8fde\u8f7d\u7684\u4e0a\u4e00\u7bc7\u6587\u7ae0<\/a>\uff0c\u63d0\u524d\u5b8c\u6210Google Cloud Speech\u4f7f\u7528\u524d\u7684\u76f8\u5173\u51c6\u5907\u5de5\u4f5c\u3002\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7<a href=\"https:\/\/console.cloud.google.com\/getting-started?angularJsUrl=\" target=\"_blank\" rel=\"noopener\">Google Cloud Console<\/a>\uff0c\u542f\u7528Cloud Speech\uff0c\u5b89\u88c5SDK\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-24736\" src=\"https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2026\/04\/zero-16.png\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" srcset=\"https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2026\/04\/zero-16.png 600w, https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2026\/04\/zero-16.png 300w\" alt=\"zero-16\" width=\"600\" height=\"343\" \/><\/p>\n<p>Cloud Speech\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u521b\u5efabutton_watch.py\u7a0b\u5e8f\uff0c\u4ee5\u786e\u4fdd\u6309\u4e0b\u8be5\u8bbe\u5907\u7684\u6309\u94ae\u540e\uff0c\u5c31\u53ef\u4ee5\u5f00\u59cb\u63a5\u6536\u8bed\u97f3\u6307\u793a\u3002\u8fd9\u548c\u4e0a\u6b21\u5236\u4f5c\u9065\u63a7\u5668\u7684\u9879\u76ee\u539f\u7406\u57fa\u672c\u4e00\u6837\u3002<\/p>\n<pre class=\"crayon-plain-tag\">#!\/usr\/bin\/env python\r\n# -*- coding: utf-8 -*-\r\nimport time\r\nimport RPi.GPIO as GPIO\r\nimport subprocess\r\n\r\nBUTTON = 17\r\nhold_time=1.5\r\nexec_dir = \u201c\/home\/pi\/Programs\/watch\u201d\r\n\r\nGPIO.setmode(GPIO.BCM)\r\nGPIO.setup(BUTTON, GPIO.IN, pull_up_down=GPIO.PUD_UP)\r\nactions = ['python3 \u2018 + exec_dir + \u2018assistant_once.py\u2019, #\u542f\u52a8Google Assistant\r\n'python3 \u2018 + exec_dir + \u2018stream_jp_watch.py', #\u6309\u4e00\u6b21\u6309\u94ae\uff0c\u5f00\u59cb\u63a5\u6536\u8bed\u97f3\u6307\u793a\r\n'python3 \u2018 + exec_dir + \u2018grove_oled_ir.py'] #\u6309\u4e24\u6b21\u6309\u94ae\uff0c\u76f4\u63a5\u542f\u52a8\u9065\u63a7\u5668\r\n\r\nGPIO.add_event_detect(BUTTON,GPIO.FALLING)\r\nwhile True:\r\nif GPIO.event_detected(BUTTON):\r\nGPIO.remove_event_detect(BUTTON)\r\nnow = time.time()\r\ncount = 0\r\nGPIO.add_event_detect(BUTTON,GPIO.RISING)\r\nwhile time.time() &lt; now + hold_time:\r\nif GPIO.event_detected(BUTTON):\r\ncount +=1\r\ntime.sleep(.3) # debounce time\r\nprint(count)\r\ncmd = actions[count]\r\nprint(cmd)\r\nif cmd:\r\nsubprocess.call(actions[count], shell=True)\r\nGPIO.remove_event_detect(BUTTON)\r\nGPIO.add_event_detect(BUTTON, GPIO.FALLING)\r\n\r\n<\/pre>\n<p>\u5728\u8fd9\u4e00\u6b65\uff0c\u6211\u4eec\u8fd8\u8981\u8fdb\u884c\u76f8\u5e94\u7684\u8bbe\u7f6e\uff0c\u786e\u4fddRaspberry Pi\u4e0a\u7684\u6309\u94ae\u6bcf\u88ab\u6309\u4e00\u6b21\uff0cCloud Speech\u5c31\u5f00\u59cb\u63a5\u6536\u6307\u793a\uff0c\u5f53\u5176\u6536\u5230\u201c\u6253\u5f00\u9065\u63a7\u5668\u201d\u6216\u8005\u201c\u6d4b\u91cf\u6e29\u5ea6\u201d\u7b49\u8bed\u97f3\u6307\u793a\u65f6\uff0c\u5c31\u53ef\u4ee5\u8fd0\u884c\u521a\u521a\u521b\u5efa\u7684\u7a0b\u5e8f\u3002<br \/>\n\u5b9e\u9645\u4e0a\uff0c\u6211\u5df2\u7ecf\u5c06\u7528\u4e8e\u5f00\u59cb\u63a5\u6536\u8bed\u97f3\u6307\u793a\u7684stream_jp_watch.jp\u7b49\u7a0b\u5e8f\u7fa4\u7ec4\uff0c\u653e\u5728\u4e86\u4e0b\u8ff0\u7f51\u9875\u4e0a\uff0c\u4f5c\u4e3a\u793a\u4f8b\u7a0b\u5e8f\uff0c\u8bf7\u5404\u4f4d\u8bfb\u8005\u670b\u53cb\u81ea\u884c\u590d\u5236\u5230\u81ea\u5df1\u7684Raspberry Pi\u4e0a\u3002<br \/>\n<a href=\"https:\/\/github.com\/ktrips\/RasAi\/tree\/master\/Programs\/watch\" target=\"_blank\" rel=\"noopener\">\u3000https:\/\/github.com\/ktrips\/RasAi\/tree\/master\/Programs\/watch<\/a><br \/>\n\u2013 button_watch.py\uff1a\u6309\u4e0b\u6309\u94ae\uff0c\u5c31\u5f00\u59cb\u63a5\u6536\u8bed\u97f3\u6307\u793a<br \/>\n\u2013 stream_jp_watch.py\uff1a\u901a\u8fc7Cloud Speech\uff0c\u9488\u5bf9\u7279\u5b9a\u7684\u8bed\u97f3\u6307\u793a\u505a\u51fa\u53cd\u5e94\uff0c\u5b9e\u73b0\u4f20\u611f\u5668\u7684\u68c0\u6d4b\u3001\u9065\u63a7\u5668\u7684\u64cd\u4f5c<br \/>\n\u2013 grove_oled_ir.py\uff1a\u9065\u63a7\u5668\u7684\u5b9e\u9645\u64cd\u4f5c\u7a0b\u5e8f<br \/>\n\u2013 grove_oled_temp.py\uff1a\u6e29\u6e7f\u5ea6\u4f20\u611f\u5668\u64cd\u4f5c\u7a0b\u5e8f<br \/>\n\u2013 assistant_once.py\uff1aGoogle Assistant\u7684\u8fd0\u884c\u7a0b\u5e8f<\/p>\n<p>\u7a0b\u5e8f\u90e8\u5206\u7684\u5de5\u4f5c\u5b8c\u6210\uff0c\u63a5\u4e0b\u6765\u5c31\u8981\u5236\u4f5c\u624b\u8868\u98ce\u683c\u7684\u5916\u58f3\u4e86\u3002\u800c\u5305\u8986Raspberry Pi Zero\u7684\u5916\u58f3\uff0c\u6211\u9009\u7684\u662f\u6a61\u80f6\u58f3\u3002\u5728\u5916\u58f3\u4e0a\uff0c\u6211\u5df2\u7ecf\u7528\u5c0f\u5200\u63d0\u524d\u5207\u4e86\u4e00\u4e2a\u521a\u597d\u53ef\u4ee5\u9732\u51fa\u663e\u793a\u5c4f\u7684\u7a97\u53e3\u3002\u53e6\u5916\uff0c\u4e3a\u4e86\u80fd\u591f\u6b63\u5e38\u4f7f\u7528\u7535\u6e90\u5f00\u5173\u548cGrove\u7aef\u53e3\uff0c\u8fd8\u9700\u8981\u63d0\u524d\u5f00\u597d\u5b54\u3002<\/p>\n<p>\u6211\u8fd8\u5728\u6a61\u80f6\u5916\u58f3\u4e0a\u88c5\u4e86\u624b\u8868\u8868\u5e26\uff0c\u628a\u5b83\u505a\u6210\u4e86\u667a\u80fd\u624b\u8868\u7684\u98ce\u683c\u3002\u6b64\u65f6\uff0cGrove\u8fde\u63a5\u7ebf\u9700\u8981\u5f80\u5916\u7a0d\u5fae\u7559\u4e00\u70b9\uff0c\u4ee5\u4fbf\u66f4\u6362\u81ea\u5df1\u559c\u6b22\u7528\u7684\u4f20\u611f\u5668\u3002\u5728\u672c\u9879\u76ee\u4e2d\uff0c\u6211\u5b89\u88c5\u7684\u662f\u521a\u521a\u5df2\u7ecf\u8bbe\u7f6e\u5b8c\u6210\u7684\u6e29\u6e7f\u5ea6\u4f20\u611f\u5668\uff0c\u6216\u8005\u7ea2\u5916\u4fe1\u53f7\u53d1\u5c04LED\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-24740\" src=\"https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2026\/04\/18-2.png\" sizes=\"auto, (max-width: 472px) 100vw, 472px\" srcset=\"https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2026\/04\/18-2.png 472w, https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2026\/04\/18-2.png 300w\" alt=\"18\" width=\"472\" height=\"400\" \/><\/p>\n<p>\u6700\u540e\uff0c\u6211\u4eec\u518d\u7f16\u8f91\u4e00\u4e2a\u8fd0\u884c\u8fd9\u4e9b\u52a8\u4f5c\u7684\u811a\u672c\uff0c\u5728Raspberry Pi\u542f\u52a8\u65f6\uff0c\u8ba9\u8fd9\u4e9b\u52a8\u4f5c\u81ea\u52a8\u8fd0\u884c\u3002<\/p>\n<pre class=\"crayon-plain-tag\">#!\/bin\/bash --rcfile\r\n\r\nsource \/etc\/bash.bashrc\r\nsource ~\/.bashrc\r\nsource ~\/env\/bin\/activate\r\n\r\nexport GOOGLE_APPLICATION_CREDENTIALS=\/home\/pi\/credentials.json\r\necho $GOOGLE_APPLICATION_CREDENTIALS\r\n\r\ncd \/home\/pi\/Programs\/watch\r\necho \"Running button_watch.py!\"\r\npython button_watch.py\r\necho \"Watch Program is done!\"\r\n\r\n<\/pre>\n<pre class=\"crayon-plain-tag\">Description=Smart Watch Auto Run Program\r\n\r\n[Service]\r\nExecStart=\/bin\/bash \/home\/pi\/Programs\/watch\/watchd.sh\r\nWorkingDirectory=\/home\/pi\/Programs\/watch\r\nRestart=always\r\nUser=pi\r\n\r\n[Install]\r\nWantedBy=multi-user.target\r\n\r\n<\/pre>\n<p>\u5728Raspberry Pi\u542f\u52a8\u65f6\uff0c\u8981\u81ea\u52a8\u542f\u52a8\u8be5\u811a\u672c\uff0c\u9700\u8981\u5982\u4e0b\u6240\u793a\u6dfb\u52a0\u670d\u52a1\u3002<\/p>\n<div class=\"box-grey-01\">$ sudo cp watchd.service \/etc\/systemd\/system\/<br \/>\n$ sudo systemctl enable watchd<br \/>\n$ sudo systemctl start watchd<br \/>\n$ sudo systemctl status watchd<\/div>\n<p>\u63a5\u4e0b\u6765\uff0c\u6211\u4eec\u91cd\u65b0\u542f\u52a8Raspberry Pi Zero\u6765\u9a8c\u8bc1\u4e00\u4e0b\u3002\u6309\u94ae\u6309\u4e00\u6b21\uff0c\u5c31\u4f1a\u5f00\u59cb\u63a5\u6536\u8bed\u97f3\u6307\u793a\u3002\u6b64\u65f6\uff0c\u8bf7\u5bf9\u7740\u5b83\u53d1\u51fa\u201c\u6253\u5f00\u7535\u89c6\u673a\uff01\u201d\u6216\u8005\u201c\u6253\u5f00\u52a0\u6e7f\u5668\u201d\u8fd9\u6837\u7684\u8bed\u97f3\u6307\u793a\u3002\u5982\u679c\u5728\u8bbe\u5907\u7684\u7ea2\u5916\u7ebf\u63a5\u6536\u5668\u9644\u8fd1\u53d1\u51fa\u8bed\u97f3\u6307\u793a\uff0c\u5219\u667a\u80fd\u624b\u8868\u5c06\u4f1a\u5316\u8eab\u9065\u63a7\u5668\u8fdb\u884c\u5de5\u4f5c\u3002\u53e6\u5916\uff0c\u6309\u94ae\u6309\u4e24\u6b21\uff0c\u5219\u4f1a\u76f4\u63a5\u8fd0\u884c\u60a8\u81ea\u5df1\u559c\u6b22\u7684\u7a0b\u5e8f\u3002\u957f\u6309\u6309\u94ae\uff0c\u5219Google Assistant\u542f\u52a8\uff0c\u7136\u540e\u5c31\u4f1a\u544a\u8bc9\u6211\u4eec\u5929\u6c14\u4ee5\u53ca\u8def\u7ebf\u7b49\u4fe1\u606f\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-24742\" src=\"https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2026\/04\/21-1.png\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" srcset=\"https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2026\/04\/21-1.png 600w, https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2026\/04\/21-1.png 300w\" alt=\"21\" width=\"600\" height=\"231\" \/><\/p>\n<p>\u9664\u6b64\u4ee5\u5916\uff0c\u5efa\u8bae\u5404\u4f4d\u8bfb\u8005\u670b\u53cb\u8bd5\u7740\u66f4\u6362\u6210\u5176\u4ed6Grove\u4f20\u611f\u5668\uff0c\u8fdb\u884c\u5404\u79cd\u5c1d\u8bd5\u3002\u53ea\u8981\u7ed9\u624b\u8868\u53d1\u51fa\u8bed\u97f3\u6307\u793a\uff0c\u5c31\u80fd\u4f7f\u7528\u9065\u63a7\u529f\u80fd\u548cAssistant\u529f\u80fd\u3002\u8fd9\u6837\uff0c\u4e00\u6b3e\u5145\u6ee1\u672a\u6765\u6c14\u606f\u7684\u667a\u80fd\u624b\u8868\u5c31\u5236\u4f5c\u5b8c\u6210\u4e86\uff01<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-24743\" src=\"https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2026\/04\/22-1.png\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" srcset=\"https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2026\/04\/22-1.png 600w, https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2026\/04\/22-1.png 300w\" alt=\"22\" width=\"600\" height=\"400\" \/><\/p>\n<h2>4.\u603b\u7ed3<\/h2>\n<p>\u5728\u672c\u9879\u76ee\u4e2d\uff0c\u6211\u4eec\u5728Raspberry Pi Zero\u4e0a\u5b89\u88c5\u663e\u793a\u5c4f\uff0c\u8bd5\u7740\u5236\u4f5c\u4e86\u4e00\u6b3e\u667a\u80fd\u624b\u8868\u3002\u5b83\u96c6\u6210\u4e86\u4e4b\u524d\u9879\u76ee\u4e2d\u7684\u4f20\u611f\u5668\u548c\u9065\u63a7\u529f\u80fd\uff0c\u518d\u52a0\u4e0a\u8bed\u97f3\u8bc6\u522b\u529f\u80fd\uff0c\u79f0\u5f97\u4e0a\u662f\u4e00\u6b3e\u8d27\u771f\u4ef7\u5b9e\u7684\u667a\u80fd\u624b\u8868\u3002<\/p>\n<p>\u503c\u5f97\u4e00\u63d0\u7684\u662f\uff0c\u6211\u4eec\u53ea\u9700\u8981\u66ff\u6362\u6210Grove\u7684\u5176\u4ed6\u5404\u7c7b\u4f20\u611f\u5668\uff0c\u5c31\u80fd\u76f8\u5e94\u5730\u663e\u793a\u5176\u4ed6\u4fe1\u606f\u3002\u6bd4\u5982\u8bf4\uff0c\u5982\u679c\u4f7f\u7528\u7a7a\u6c14\u6e05\u6d01\u5ea6\u4f20\u611f\u5668\uff0c\u5c31\u53ef\u4ee5\u7528\u4e8e\u7a7a\u6c14\u51c0\u5316\u5668\u7684\u68c0\u6d4b\u3002\u6b64\u5916\uff0c\u5982\u679c\u5b89\u88c5GPS\u6216\u8005\u5fc3\u7387\u4f20\u611f\u5668\u7b49\u90e8\u4ef6\uff0c\u8fd8\u53ef\u4ee5\u5c06\u5176\u7528\u4f5c\u5065\u5eb7\u7ba1\u7406\u8bbe\u5907\u3002<\/p>\n<p>\u201c\u4f7f\u7528\u5c0f\u5de7\u7684Raspberry Pi Zero\u5236\u4f5c\u79fb\u52a8\u8bbe\u5907\uff01\u201d\u7cfb\u5217\u5171\u56db\u7bc7\uff0c\u672c\u7bc7\u662f\u6700\u7ec8\u7bc7\u3002\u76f8\u4fe1\u5404\u4f4d\u8bfb\u8005\u670b\u53cb\u4e5f\u5df2\u7ecf\u6e05\u695a\uff0c\u4f7f\u7528Raspberry Pi Zero\uff0c\u786e\u5b9e\u53ef\u4ee5\u5236\u4f5c\u5404\u79cd\u5404\u6837\u7684\u5916\u5f62\u5c0f\u5de7\u3001\u800c\u4e14\u652f\u6301\u58f0\u63a7\u529f\u80fd\u7684\u667a\u80fd\u8bbe\u5907\u3002\u5efa\u8bae\u60a8\u4eca\u540e\u4e5f\u4e00\u5b9a\u8981\u5c1d\u8bd5\u4f7f\u7528Raspberry Pi\u5236\u4f5c\u667a\u80fd\u5316\u7684\u7535\u5b50\u4f5c\u54c1\uff01\u611f\u8c22\u5927\u5bb6\u7684\u9605\u8bfb\uff01<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p><strong><span style=\"font-size: 14pt;\">\u672c\u7cfb\u5217\u8fde\u8f7d\u7684\u5185\u5bb9<\/span><\/strong><\/p>\n<p>\u7b2c1\u7bc7\uff1a<a href=\"https:\/\/techclass.wfjydl.com\/knowledge\/tech-info\/raspberry\/raspberrypi_zero_01\/\">\u4f7f\u7528Raspberry Pi Zero\u548cRaspberry Pi Hat\u8f7b\u677e\u8fdb\u884c\u7535\u5b50\u5236\u4f5c\uff01<\/a><br \/>\n\u7b2c2\u7bc7\uff1a<a href=\"https:\/\/techclass.wfjydl.com\/knowledge\/tech-info\/raspberry\/raspberrypi_zero_02\/\">\u4f7f\u7528Grove\u4f20\u611f\u5668\u5236\u4f5c\u73af\u5883\u68c0\u6d4b\u8bbe\u5907\uff01<\/a><br \/>\n\u7b2c3\u7bc7\uff1a<a href=\"https:\/\/techclass.wfjydl.com\/knowledge\/tech-info\/raspberry\/raspberrypi_zero_03\/\">\u5236\u4f5c\u58f0\u63a7\u591a\u529f\u80fd\u9065\u63a7\u5668\uff01<\/a><br \/>\n\u7b2c4\u7bc7\uff1a\u5236\u4f5c\u5c0f\u5c4f\u667a\u80fd\u624b\u8868\uff01\uff08\u672c\u6587\uff09<\/p>\n<div class=\"author-box-wrapper\">\n<div class=\"avatar-wrapper\"><img loading=\"lazy\" decoding=\"async\" class=\"avatar avatar-90 photo\" src=\"https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2026\/04\/avatar-avatar.jpg\" srcset=\"https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2026\/04\/avatar-avatar.jpg 2x\" alt=\"\u30a2\u30d0\u30bf\u30fc\u753b\u50cf\" width=\"90\" height=\"90\" \/><\/div>\n<div class=\"desc-wrapper\">\n<h5>\u5409\u7530\u3000\u663e\u4e00\uff08Yoshiken\uff09<\/h5>\n<div class=\"desc\">\n<p>\u5728\u666e\u901a\u516c\u53f8\u5de5\u4f5c\u7684\u4e0a\u73ed\u65cf\uff0c\u975e\u5e38\u559c\u6b22\u521b\u4f5c\u7684\u5468\u672b\u521b\u5ba2\uff0c\u51fa\u7248\u4e86\u7535\u5b50\u4e66<a href=\"https:\/\/www.amazon.co.jp\/gp\/product\/B01CCIHQPO\">MESHBOOK<\/a>\uff0c\u5e73\u65f6\u4e5f\u5199\u5199\u535a\u5ba2\u3002<\/p>\n<p><a href=\"http:\/\/blog.ktrips.net\" target=\"_blank\" rel=\"noopener\">http:\/\/blog.ktrips.net<\/a><\/p>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"&nbsp; \u7b2c1\u7bc7\uff1a\u4f7f\u7528Raspberry Pi Zero\u548cRaspberry Pi Hat\u8f7b\u677e\u8fdb\u884c\u7535\u5b50\u5236\u4f5c\uff01 \u7b2c2\u7bc7\uff1a\u4f7f\u7528Grove\u4f20\u611f\u5668\u5236\u4f5c\u73af\u5883\u68c0\u6d4b\u8bbe\u5907\uff01 \u7b2c3\u7bc7\uff1a\u5236\u4f5c\u58f0\u63a7\u591a\u529f\u80fd\u9065\u63a7\u5668\uff01 &nbsp; \u5927\u5bb6\u597d\u3002\u6211\u662f [&hellip;]","protected":false},"author":4,"featured_media":24121,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1132],"tags":[],"class_list":["post-24087","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\/24087","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=24087"}],"version-history":[{"count":9,"href":"https:\/\/techclass.wfjydl.com\/wp-json\/wp\/v2\/posts\/24087\/revisions"}],"predecessor-version":[{"id":30247,"href":"https:\/\/techclass.wfjydl.com\/wp-json\/wp\/v2\/posts\/24087\/revisions\/30247"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/techclass.wfjydl.com\/wp-json\/wp\/v2\/media\/24121"}],"wp:attachment":[{"href":"https:\/\/techclass.wfjydl.com\/wp-json\/wp\/v2\/media?parent=24087"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/techclass.wfjydl.com\/wp-json\/wp\/v2\/categories?post=24087"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/techclass.wfjydl.com\/wp-json\/wp\/v2\/tags?post=24087"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}