{"id":2824,"date":"2022-07-19T12:43:06","date_gmt":"2022-07-19T12:43:06","guid":{"rendered":"https:\/\/picockpit.com\/raspberry-pi\/?p=2824"},"modified":"2023-08-22T14:46:06","modified_gmt":"2023-08-22T14:46:06","slug":"diy-wireless-servo-switch-controller-with-raspberry-pi-pico-w","status":"publish","type":"post","link":"https:\/\/picockpit.com\/raspberry-pi\/zh\/diy-wireless-servo-switch-controller-with-raspberry-pi-pico-w\/","title":{"rendered":"\u4f7f\u7528\u6811\u8393\u6d3ePico W\u7684DIY\u65e0\u7ebf\u4f3a\u670d\u5f00\u5173\u63a7\u5236\u5668"},"content":{"rendered":"<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"576\" src=\"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/07\/featured-image-4-1024x576.jpg\" alt=\"Pico W \u4f3a\u670d\u5f00\u5173\u63a7\u5236\u5668 \u6807\u9898\u56fe\u50cf\" class=\"wp-image-2854\" srcset=\"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/07\/featured-image-4-1024x576.jpg 1024w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/07\/featured-image-4-300x169.jpg 300w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/07\/featured-image-4-768x432.jpg 768w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/07\/featured-image-4-1536x864.jpg 1536w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/07\/featured-image-4-18x10.jpg 18w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/07\/featured-image-4.jpg 1778w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>\u6211\u9047\u5230\u7684\u6700\u5927\u95ee\u9898\u4e4b\u4e00\u662f\u4ece\u5e8a\u4e0a\u722c\u8d77\u6765\u5173\u6389\u5367\u5ba4\u7684\u706f\u3002\u5f53\u4f60\u60ec\u610f\u5730\u8eba\u5728\u5e8a\u4e0a\u65f6\uff0c\u5f88\u96be\u505a\u5230\u8fd9\u4e00\u70b9\u3002\u5728\u8fd9\u91cc\uff0c\u6211\u60f3\u544a\u8bc9\u5927\u5bb6\u5982\u4f55\u7528 Pico W \u4f3a\u670d\u5f00\u5173\u63a7\u5236\u5668\u6765\u89e3\u51b3\u8fd9\u4e2a\u95ee\u9898\u3002<\/p>\n\n\n\n<p>\u51e0\u5e74\u524d\uff0c\u6211\u7528 Arduino \u548c\u7ea2\u5916\u9065\u63a7\u5668\u5236\u4f5c\u4e86\u4e00\u4e2a\u65e0\u7ebf\u89e3\u51b3\u65b9\u6848\u3002\u56e0\u4e3a\u5b83\u5f88\u53ef\u9760\uff0c\u800c\u4e14\u89e3\u51b3\u4e86\u6211\u7684\u95ee\u9898\uff0c\u6240\u4ee5\u6548\u679c\u8fd8\u4e0d\u9519\u3002\u4f46\u4e5f\u4e0d\u662f\u6ca1\u6709\u7f3a\u70b9\u3002<\/p>\n\n\n\n<p>\u9996\u5148\uff0c\u4e0eRaspberry Pi Pico W\u76f8\u6bd4\uff0cArduino Uno\u975e\u5e38\u5e9e\u5927\u3002<\/p>\n\n\n\n<p>\u7b2c\u4e8c\uff0c\u5b83\u4f9d\u8d56\u4e8e\u7ea2\u5916\u4fe1\u53f7\uff0c\u8fd9\u610f\u5473\u7740\u5f53\u6211\u60f3\u628a\u706f\u5173\u6389\u65f6\uff0c\u6211\u9700\u8981\u77e5\u9053\u6211\u7684\u7ea2\u5916\u9065\u63a7\u5668\u5728\u54ea\u91cc\u3002<\/p>\n\n\n\n<p>\u800c\u8fd9\u6b63\u662fRaspberry Pi Pico W\u7684\u4f18\u52bf\u6240\u5728\u3002\u4f60\u53ef\u4ee5\u76f4\u63a5\u4ece\u4f60\u7684\u624b\u673a\u4e0a\u63a7\u5236\u8235\u673a\u3002<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/07\/diy-wireless-switch-control-project.jpg\" alt=\"Pico W \u4f3a\u670d\u5f00\u5173\u63a7\u5236\u5668\" class=\"wp-image-2853\" style=\"width:519px;height:386px\" width=\"519\" height=\"386\" srcset=\"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/07\/diy-wireless-switch-control-project.jpg 1000w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/07\/diy-wireless-switch-control-project-300x223.jpg 300w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/07\/diy-wireless-switch-control-project-768x571.jpg 768w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/07\/diy-wireless-switch-control-project-16x12.jpg 16w\" sizes=\"auto, (max-width: 519px) 100vw, 519px\" \/><figcaption class=\"wp-element-caption\">DIY\u65e0\u7ebf\u5f00\u5173\u63a7\u5236\u9879\u76ee\u7684\u6982\u8ff0<\/figcaption><\/figure>\n<\/div>\n\n\n\n\n<h2 class=\"wp-block-heading\">\u4e3a\u4ec0\u4e48\u8981\u8d39\u5fc3\u505a\u8fd9\u4e2aDIY\u9879\u76ee\uff1f<\/h2>\n\n\n\n<p>\u5b83\u662f\u4e11\u964b\u7684\u3002\u5b83\u5f88\u4e4f\u5473\u3002<\/p>\n\n\n\n<p>\u4f46\u5b83\u4e5f\u6d89\u53ca\u5230\u4e3a\u4f60\u7684\u95ee\u9898\u5236\u5b9a\u81ea\u5df1\u7684\u89e3\u51b3\u65b9\u6848\u7684\u559c\u60a6\u548c\u4e50\u8da3\u3002<\/p>\n\n\n\n<p>\u73b0\u4ee3\u95ee\u9898\u9700\u8981\u73b0\u4ee3\u7684\u89e3\u51b3\u65b9\u6848\uff0c\u800c <a href=\"https:\/\/picockpit.com\/raspberry-pi\/raspberry-pi-project-ideas-modern-solutions-require-more-modern-solutions\/\">\u4f60\u53ef\u4ee5\u5728\u8fd9\u91cc\u770b\u5230\u4eba\u4eec\u5982\u4f55\u7528Raspberry Pi\u89e3\u51b3\u4ed6\u4eec\u7684\u95ee\u9898\u3002<\/a>.<\/p>\n\n\n\n<p>\u6b64\u5916\uff0c\u60a8\u53ef\u80fd\u9700\u8981\u8fd9\u6837\u505a\uff0c\u56e0\u4e3a\u60a8\u4e0d\u88ab\u5141\u8bb8\u4fee\u6539\u5bb6\u4e2d\u7684\u7535\u6c14\u8bbe\u7f6e\u3002 <\/p>\n\n\n\n<p>\u6216\u8005\u4f60\u4e0d\u60f3\u82b1\u94b1\u96c7\u4e00\u4e2a\u4e13\u4e1a\u4eba\u5458\u6765\u505a\u3002<\/p>\n\n\n\n<p>\u53e6\u4e00\u4e2a\u539f\u56e0\u662f\u8fd9\u4e2a\u9879\u76ee\u662f\u5982\u6b64\u7684\u53ef\u6269\u5c55\u548c\u53ef\u79fb\u690d\u3002\u4f60\u4e0d\u5fc5\u628a\u5b83\u7528\u5728\u7535\u706f\u5f00\u5173\u4e0a\uff0c\u4f60\u53ef\u4ee5\u628a\u5b83\u7528\u5728\u952e\u76d8\u4e0a\uff0c\u4f8b\u5982\u7528\u6765\u505c\u6b62\u5c4f\u5e55\u4fdd\u62a4\u7a0b\u5e8f\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u89c6\u9891<\/h2>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\"><\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<iframe loading=\"lazy\" width=\"225\" height=\"400\" src=\"https:\/\/www.youtube.com\/embed\/g2T8vYcRi1Y\" title=\"\u7528Raspberry Pi Pico W #\u77ed\u88e4DIY\u65e0\u7ebf\u4f3a\u670d\u5f00\u5173\u63a7\u5236\u5668\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen=\"\"><\/iframe>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\"><\/div>\n<\/div>\n\n\n\n<h2 class=\"wp-block-heading\">\u53cc\u5411\u5f00\u5173\u63a7\u5236\u662f\u53ef\u80fd\u7684\uff0c\u4f46\u5355\u5411\u5f00\u5173\u6700\u5bb9\u6613\u3002<\/h2>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/07\/20220718_184642-1000px-edited.jpg\" alt=\"Pico W \u4f3a\u670d\u5f00\u5173\u63a7\u5236\u5668\" class=\"wp-image-2847\" style=\"width:545px;height:409px\" width=\"545\" height=\"409\" srcset=\"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/07\/20220718_184642-1000px-edited.jpg 769w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/07\/20220718_184642-1000px-edited-300x225.jpg 300w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/07\/20220718_184642-1000px-edited-16x12.jpg 16w\" sizes=\"auto, (max-width: 545px) 100vw, 545px\" \/><figcaption class=\"wp-element-caption\">\u8235\u673a\u542f\u52a8\uff0c\u5173\u95ed\u7535\u706f\u5f00\u5173<\/figcaption><\/figure>\n<\/div>\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/07\/20220718_184650-1000px-edited.jpg\" alt=\"Pico W \u4f3a\u670d\u5f00\u5173\u63a7\u5236\u5668\" class=\"wp-image-2848\" style=\"width:539px;height:404px\" width=\"539\" height=\"404\" srcset=\"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/07\/20220718_184650-1000px-edited.jpg 667w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/07\/20220718_184650-1000px-edited-300x225.jpg 300w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/07\/20220718_184650-1000px-edited-16x12.jpg 16w\" sizes=\"auto, (max-width: 539px) 100vw, 539px\" \/><figcaption class=\"wp-element-caption\">\u4f3a\u670d\u673a\u5904\u4e8e\u5168\u901f\u65cb\u8f6c\u72b6\u6001\uff0c\u5173\u95ed\u5f00\u5173<\/figcaption><\/figure>\n<\/div>\n\n\n<p>\u5982\u679c\u6709\u4e00\u4ef6\u4e8b\u4f60\u80af\u5b9a\u80fd\u505a\u5230\uff0c\u4e16\u754c\u4e0a\u6240\u6709\u7684\u5f00\u5173\uff0c\u65e0\u8bba\u662f\u6b27\u6d32\u7684\u8fd8\u662f\u5317\u7f8e\u7684\uff0c\u4f60\u603b\u80fd\u7528\u4e00\u4e2a\u4f3a\u670d\u673a\u6765\u5173\u95ed\u6216\u6253\u5f00\u5b83\u3002<\/p>\n\n\n\n<p>\u4f46\u5982\u679c\u4f60\u60f3\u53cc\u5411\u63a7\u5236\u5f00\u5173\uff0c\u5c31\u4f1a\u6210\u4e3a\u4e00\u4e2a\u66f4\u5927\u7684\u5de5\u7a0b\u6311\u6218\uff0c\u56e0\u4e3a\u4f3a\u670d\u673a\u53ef\u80fd\u4f1a\u788d\u4e8b\u3002<\/p>\n\n\n\n<p>\u4f8b\u5982\uff0c\u5982\u679c\u4f60\u9700\u8981\u80fd\u591f\u624b\u52a8\u6253\u5f00\u6216\u5173\u95ed\u5f00\u5173\uff0c\u4f60\u53ef\u80fd\u4f1a\u53d1\u73b0\u4f3a\u670d\u81c2\u6321\u4f4f\u4e86\u8def\u3002\u4f60\u4e0d\u80fd\u5728\u4e0d\u7834\u574f\u7535\u673a\u7684\u60c5\u51b5\u4e0b\u628a\u5b83\u5f3a\u884c\u62c9\u5f00\uff0c\u56e0\u4e3a\u4f3a\u670d\u673a\u7684\u7a0b\u5e8f\u662f\u8981\u5168\u529b\u4fdd\u6301\u81ea\u5df1\u7684\u4f4d\u7f6e\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u5e7f\u64ad\u7f51\u7edc\u6216\u8fde\u63a5\u5230\u7f51\u7edc\uff1f<\/h2>\n\n\n\n<p>Raspberry Pi Pico W\u53ef\u4ee5\u8fde\u63a5\u5230\u4f60\u7684\u5bb6\u5ead\u7f51\u7edc\uff0c\u6216\u8005\u5b83\u53ef\u4ee5\u5e7f\u64ad\u81ea\u5df1\u7684\u7f51\u7edc\u3002<\/p>\n\n\n\n<p>\u6211\u4e24\u79cd\u65b9\u6cd5\u90fd\u8bd5\u8fc7\u4e86\uff0c\u53d1\u73b0\u4e24\u79cd\u65b9\u6cd5\u90fd\u6709\u4e00\u4e9b\u4f18\u70b9\u548c\u7f3a\u70b9\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u4f5c\u4e3a\u4e00\u4e2a\u7ad9\u70b9\uff08\u5373\u8fde\u63a5\u5230\u4e00\u4e2a\u7f51\u7edc\u4e0a\uff09<\/h3>\n\n\n\n<p>\u5728\u6700\u521d\u7684\u8bbe\u8ba1\u4e2d\uff0c\u6211\u8ba9\u6211\u7684Pico W\u8fde\u63a5\u5230\u6211\u7684\u5bb6\u5ead\u7f51\u7edc\uff0c\u5b83\u5728\u5176IP\u5730\u5740192.168.0.70\u4e0a\u63d0\u4f9b\u4e86\u4e00\u4e2a\u5e26\u6709\u6309\u94ae\u7684HTML\u6587\u4ef6\u3002<\/p>\n\n\n\n<p>\u8fd9\u6837\u505a\u7684\u597d\u5904\u662f\uff0c\u6211\u5f88\u5bb9\u6613\u5c31\u80fd\u542f\u52a8\u6211\u7684\u6d4f\u89c8\u5668\uff0c\u6309\u4e0b\u5173\u706f\u7684\u6309\u94ae\u3002<\/p>\n\n\n\n<p>\u7136\u800c\uff0c\u7f3a\u70b9\u662f\u7f51\u7edc\u4e0a\u7684\u4efb\u4f55\u4eba\u4e5f\u80fd\u591f\u8fd9\u6837\u505a\uff0c\u9664\u975e\u4f60\u5b9e\u65bd\u67d0\u79cd\u5f62\u5f0f\u7684\u8ba4\u8bc1\u3002<\/p>\n\n\n\n<p>\u53e6\u4e00\u4e2a\u7f3a\u70b9\u662f\uff0c\u5982\u679c\u4f60\u7684\u5bb6\u5ead\u7f51\u7edc\u65ad\u7535\uff0cRaspberry Pi Pico W\u4e0d\u4f1a\u91cd\u65b0\u8fde\u63a5\u5230\u7f51\u7edc\uff0c\u9664\u975e\u4f60\u5b9e\u73b0\u4e86\u91cd\u542fPico W\u6216\u91cd\u65b0\u8fde\u63a5\u5230\u7f51\u7edc\u7684\u4ee3\u7801\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u4f5c\u4e3a\u4e00\u4e2a\u63a5\u5165\u70b9<\/h3>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"358\" height=\"172\" src=\"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/07\/image-57.png\" alt=\"\" class=\"wp-image-2851\" srcset=\"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/07\/image-57.png 358w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/07\/image-57-300x144.png 300w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/07\/image-57-18x9.png 18w\" sizes=\"auto, (max-width: 358px) 100vw, 358px\" \/><figcaption class=\"wp-element-caption\">\u8fde\u63a5\u5230\u8fd9\u91cc\u540e\uff0c\u4f3a\u670d\u673a\u5c06\u65cb\u8f6c\uff0c\u5173\u95ed\u5f00\u5173\u3002<\/figcaption><\/figure>\n<\/div>\n\n\n<p>\u76ee\u524d\uff0c\u6211\u6b63\u5728\u4f7f\u7528\u6211\u7684Pico W\u4f5c\u4e3a\u4e00\u4e2a\u63a5\u5165\u70b9\uff0c\u5c3d\u7ba1\u6211\u5e76\u4e0d\u662f\u8bf4\u8fd9\u662f\u6700\u597d\u7684\u65b9\u6cd5\u3002<\/p>\n\n\n\n<p>\u5b83\u5e7f\u64ad\u4e86\u4e00\u4e2a\u7f51\u7edc\uff0c\u6211\u5fc5\u987b\u5355\u72ec\u8fde\u63a5\u5230\u8fd9\u4e2a\u7f51\u7edc\uff0c\u4ee5\u4fbf\u6211\u63a7\u5236\u4f3a\u670d\u673a\u3002\u8fd9\u662f\u4e00\u4e2a\u4e0d\u65b9\u4fbf\u7684\u7f3a\u70b9\u3002<\/p>\n\n\n\n<p>\u8fd9\u6837\u505a\u7684\u597d\u5904\u662f\uff0c\u4e0e\u7ad9\u5f0f\u65b9\u6cd5\u4e0d\u540c\uff0c\u4f60\u5728\u7f51\u7edc\u4e0a\u6709\u4e00\u4e2a\u5bc6\u7801\uff0c\u6240\u4ee5\u53ea\u6709\u4f60\u80fd\u8fde\u63a5\u5230\u5b83\u3002<\/p>\n\n\n\n<p>\u6700\u521d\uff0c\u6211\u6709\u4e00\u4e2a\u63a5\u5165\u70b9\uff0c\u5b83\u63d0\u4f9b\u4e86\u4e00\u4e2a\u5e26\u6709\u6309\u94ae\u7684\u7f51\u9875\u6765\u89e6\u53d1\u4f3a\u670d\u88c5\u7f6e\u3002\u6211\u53d1\u73b0\u8fd9\u592a\u9ebb\u70e6\u4e86\uff0c\u56e0\u4e3a\u4f60\u9700\u89811\uff09\u8fde\u63a5\u5230\u7f51\u7edc\uff0c2\uff09\u8fdb\u5165Pico W\u7684IP\u5730\u5740\uff0c3\uff09\u6309\u4e0b\u6309\u94ae<\/p>\n\n\n\n<p>\u6211\u53d1\u73b0\u6700\u597d\u7684\u89e3\u51b3\u529e\u6cd5\u662f\uff0c\u4e00\u65e6Pico W\u68c0\u6d4b\u5230\u6709\u5ba2\u6237\u8fde\u63a5\u5230\u63a5\u5165\u70b9\uff0c\u5c31\u89e6\u53d1\u4f3a\u670d\u88c5\u7f6e\u3002\u8fd9\u6837\uff0c\u4f60\u6240\u8981\u505a\u7684\u5c31\u662f\u628a\u4efb\u4f55\u8bbe\u5907\u8fde\u63a5\u5230Pico W\u4e0a\uff0c\u4f60\u7684\u706f\uff08\u6216\u5f00\u5173\uff09\u5c31\u4f1a\u5173\u95ed\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u5c06Pico W\u8fde\u63a5\u5230\u4e00\u4e2a\u4f3a\u670d\u673a\u4e0a<\/h2>\n\n\n\n<p>\u8fd9\u662f\u4e00\u4e2a\u7b80\u5355\u7684\u9879\u76ee\uff0c\u4f60\u5e94\u8be5\u80fd\u5728\u521d\u5b66\u8005\u7684\u5957\u4ef6\u4e2d\u627e\u5230\u96f6\u4ef6\u3002\u5982\u679c\u6ca1\u6709\uff0c\u8fd9\u91cc\u6709\u4e00\u4e2a\u96f6\u4ef6\u6e05\u5355\u3002<\/p>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\"><div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2021\/03\/Raspberry-Pi-Pico-Video-Output-DVI-Sock-withPicoComfort-1024x683.jpg\" alt=\"\u6811\u8393\u6d3e-Pico-\u89c6\u9891\u8f93\u51fa-DVI-Sock\" class=\"wp-image-768\" style=\"width:287px;height:191px\" width=\"287\" height=\"191\" srcset=\"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2021\/03\/Raspberry-Pi-Pico-Video-Output-DVI-Sock-withPicoComfort-1024x683.jpg 1024w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2021\/03\/Raspberry-Pi-Pico-Video-Output-DVI-Sock-withPicoComfort-300x200.jpg 300w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2021\/03\/Raspberry-Pi-Pico-Video-Output-DVI-Sock-withPicoComfort-768x512.jpg 768w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2021\/03\/Raspberry-Pi-Pico-Video-Output-DVI-Sock-withPicoComfort-1536x1024.jpg 1536w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2021\/03\/Raspberry-Pi-Pico-Video-Output-DVI-Sock-withPicoComfort.jpg 1600w\" sizes=\"auto, (max-width: 287px) 100vw, 287px\" \/><\/figure>\n<\/div><\/div>\n\n\n\n<div class=\"wp-block-column is-vertically-aligned-center is-layout-flow wp-block-column-is-layout-flow\">\n<p class=\"has-text-align-center\"><strong><a href=\"https:\/\/buyzero.de\/products\/raspberry-pi-pico-w-h-konfigurator-pico-pico-w-pico-h-pico-wh\">Pico W (\u52a0\u6807\u9898)<\/a><\/strong><\/p>\n<\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\"><div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><a href=\"https:\/\/buyzero.de\/products\/zerocam-camera-for-raspberry-pi-zero?_pos=1&amp;_sid=9d7b61947&amp;_ss=r\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/07\/image-52.png\" alt=\"\" class=\"wp-image-2834\" style=\"width:283px;height:212px\" width=\"283\" height=\"212\" srcset=\"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/07\/image-52.png 600w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/07\/image-52-300x225.png 300w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/07\/image-52-16x12.png 16w\" sizes=\"auto, (max-width: 283px) 100vw, 283px\" \/><\/a><\/figure>\n<\/div><\/div>\n\n\n\n<div class=\"wp-block-column is-vertically-aligned-center is-layout-flow wp-block-column-is-layout-flow\">\n<p class=\"has-text-align-center\"><strong><a href=\"https:\/\/buyzero.de\/products\/zerocam-camera-for-raspberry-pi-zero?_pos=1&amp;_sid=9d7b61947&amp;_ss=r\">\u5fae\u4f3a\u670d\uff08\u5982SG90\uff09<\/a><\/strong><\/p>\n<\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\"><div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><a href=\"https:\/\/buyzero.de\/products\/copy-of-premium-female-female-jumper-wires-40-x-6\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/07\/image-54.png\" alt=\"\" class=\"wp-image-2836\" style=\"width:288px;height:216px\" width=\"288\" height=\"216\" srcset=\"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/07\/image-54.png 600w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/07\/image-54-300x225.png 300w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/07\/image-54-16x12.png 16w\" sizes=\"auto, (max-width: 288px) 100vw, 288px\" \/><\/a><\/figure>\n<\/div><\/div>\n\n\n\n<div class=\"wp-block-column is-vertically-aligned-center is-layout-flow wp-block-column-is-layout-flow\">\n<p class=\"has-text-align-center\"><strong><a href=\"https:\/\/buyzero.de\/products\/zerocam-camera-for-raspberry-pi-zero?_pos=1&amp;_sid=9d7b61947&amp;_ss=r\">\u8df3\u7ebf<\/a><\/strong><\/p>\n<\/div>\n<\/div>\n\n\n\n<p>\u6211\u8fd8\u4f7f\u7528\u4e86\u4e00\u4e2a\u53ef\u9009\u7684\u9762\u5305\u677f\uff0c\u7528\u516c-\u6bcd\u8df3\u7ebf\u5c06\u4f3a\u670d\u673a\u4e0ePico W\u8fde\u63a5\u8d77\u6765\uff0c\u4f46\u4f60\u4e5f\u53ef\u4ee5\u7528\u516c-\u6bcd\u8df3\u7ebf\u5c06\u4f3a\u670d\u673a\u76f4\u63a5\u8fde\u63a5\u5230Pico W\u7684\u9488\u5ea7\u4e0a\u3002<\/p>\n\n\n\n<p>\u4f60\u8fd8\u9700\u8981\u53cc\u9762\u80f6\u628a\u4f60\u7684\u4f3a\u670d\u673a\u7c98\u5728\u706f\u5149\u5f00\u5173\u5916\u58f3\u4e0a\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u63a5\u7ebf<\/h2>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/07\/image-55.png\" alt=\"Pico W \u4f3a\u670d\u5f00\u5173\u63a7\u5236\u5668\" class=\"wp-image-2838\" style=\"width:665px;height:406px\" width=\"665\" height=\"406\" srcset=\"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/07\/image-55.png 737w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/07\/image-55-300x183.png 300w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/07\/image-55-18x12.png 18w\" sizes=\"auto, (max-width: 665px) 100vw, 665px\" \/><figcaption class=\"wp-element-caption\">\u5c06Pico W\u8fde\u63a5\u5230\u4e00\u4e2a\u4f3a\u670d\u673a\u4e0a\u3002(\u56fe\u4e2d\u7528 <a href=\"http:\/\/wokwi.com\">Wokwi<\/a>)<\/figcaption><\/figure>\n<\/div>\n\n\n<p>\u4e00\u822c\u6765\u8bf4\uff0c\u6240\u6709\u7684\u4f3a\u670d\u673a\u90fd\u6709\u4e00\u6761\u7ea2\u8272\u3001\u9ed1\u8272\/\u68d5\u8272\u548c\u7b2c\u4e09\u6761\u7ebf\u3002<\/p>\n\n\n\n<p>\u5c06\u4e00\u6839\u7ea2\u8272\u8df3\u7ebf\u8fde\u63a5\u5230\u6765\u81ea\u4f3a\u670d\u673a\u7684\u7ea2\u7ebf\u4e0a\u3002\u8fd9\u5c31\u662f\u4f60\u8981\u901a\u8fc7VBUS\u53d1\u90015V\u7684\u5730\u65b9\u3002<\/p>\n\n\n\n<p>\u5c06\u4e00\u6761\u9ed1\u7ebf\u8fde\u63a5\u5230\u9ed1\/\u68d5\u7ebf\u4e0a\u3002\u4f60\u5c06\u628a\u5b83\u8fde\u63a5\u5230Pico W\u4e0a\u7684GND\u3002<\/p>\n\n\n\n<p>\u5c06\u53e6\u4e00\u6761\u7ebf\u8fde\u63a5\u5230\u7b2c\u4e09\u6761\u7ebf\u4e0a\u3002\u6211\u7684\u7ebf\u662f\u6a59\u8272\u7684\uff0c\u6240\u4ee5\u6211\u7528\u4e86\u4e00\u6761\u6a59\u8272\u7684\u8df3\u7ebf\u3002\u8fd9\u662f\u6211\u8fde\u63a5\u5230GPIO16\u7684\u4fe1\u53f7\u7ebf\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u51c6\u5219<\/h2>\n\n\n\n<p>\u8fd9\u6bb5\u4ee3\u7801\u5c06\u5141\u8bb8\u4f60\u5728\u5ba2\u6237\u7aef\u8fde\u63a5\u5230Pico W\u7684SoftAP\u63a5\u5165\u70b9\u65f6\u89e6\u53d1\u4f3a\u670d\u3002<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#2e3440ff\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewbox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" data-code=\"import networkimport machinefrom machine import PWMfrom time import sleep#Pin param = servo GPIO pin numberpwm = PWM(machine.Pin(16))ssid = 'Lights-Out'password = 'sleeptime'ap = network.WLAN(network.AP_IF)ap.config(essid=ssid, password=password)ap.active(True)while ap.active() == False:  passprint('Connection successful')print(ap.ifconfig())def rotateServo ():    pwm.freq(50)    pwm.duty_ns(2000000)    sleep(0.5)    pwm.duty_ns(1500000)#ap.status is a blank array until someone connects, then it will have one entry#when ap.status = true, then it will trigger rotateServo()# then it will shut itself off to kick the user off the network,# allowing the device to reconnect to its usual networkwhile True:    try:        if ap.status('stations'):            print('client connected')            rotateServo()            sleep(5)            ap.active(False)            sleep(2)            ap.active(True)            except OSError as e:        print('Connection closed')\" style=\"color:#d8dee9ff;display:none\" aria-label=\"\u62f7\u8d1d\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewbox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code data-no-translation=\"\"><span class=\"line\"><span style=\"color: #81A1C1\">import<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #8FBCBB\">network<\/span><\/span>\n<span class=\"line\"><span style=\"color: #8FBCBB\">import<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #8FBCBB\">machine<\/span><\/span>\n<span class=\"line\"><span style=\"color: #81A1C1\">from<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #8FBCBB\">machine<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #8FBCBB\">import<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #8FBCBB\">PWM<\/span><\/span>\n<span class=\"line\"><span style=\"color: #81A1C1\">from<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #8FBCBB\">time<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #8FBCBB\">import<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #8FBCBB\">sleep<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">#<\/span><span style=\"color: #8FBCBB\">Pin<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #8FBCBB\">param<\/span><span style=\"color: #D8DEE9FF\"> = <\/span><span style=\"color: #8FBCBB\">servo<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #8FBCBB\">GPIO<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #8FBCBB\">pin<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #8FBCBB\">number<\/span><\/span>\n<span class=\"line\"><span style=\"color: #8FBCBB\">pwm<\/span><span style=\"color: #D8DEE9FF\"> = <\/span><span style=\"color: #8FBCBB\">PWM<\/span><span style=\"color: #D8DEE9FF\">(<\/span><span style=\"color: #8FBCBB\">machine<\/span><span style=\"color: #D8DEE9FF\">.<\/span><span style=\"color: #8FBCBB\">Pin<\/span><span style=\"color: #D8DEE9FF\">(16))<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #8FBCBB\">ssid<\/span><span style=\"color: #D8DEE9FF\"> = <\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #A3BE8C\">Lights-Out<\/span><span style=\"color: #ECEFF4\">&#39;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #8FBCBB\">password<\/span><span style=\"color: #D8DEE9FF\"> = <\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #A3BE8C\">sleeptime<\/span><span style=\"color: #ECEFF4\">&#39;<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #8FBCBB\">ap<\/span><span style=\"color: #D8DEE9FF\"> = <\/span><span style=\"color: #8FBCBB\">network<\/span><span style=\"color: #D8DEE9FF\">.<\/span><span style=\"color: #8FBCBB\">WLAN<\/span><span style=\"color: #D8DEE9FF\">(<\/span><span style=\"color: #8FBCBB\">network<\/span><span style=\"color: #D8DEE9FF\">.<\/span><span style=\"color: #8FBCBB\">AP_IF<\/span><span style=\"color: #D8DEE9FF\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #8FBCBB\">ap<\/span><span style=\"color: #D8DEE9FF\">.<\/span><span style=\"color: #8FBCBB\">config<\/span><span style=\"color: #D8DEE9FF\">(<\/span><span style=\"color: #8FBCBB\">essid<\/span><span style=\"color: #D8DEE9FF\">=<\/span><span style=\"color: #8FBCBB\">ssid<\/span><span style=\"color: #ECEFF4\">,<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #8FBCBB\">password<\/span><span style=\"color: #D8DEE9FF\">=<\/span><span style=\"color: #8FBCBB\">password<\/span><span style=\"color: #D8DEE9FF\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #8FBCBB\">ap<\/span><span style=\"color: #D8DEE9FF\">.<\/span><span style=\"color: #8FBCBB\">active<\/span><span style=\"color: #D8DEE9FF\">(<\/span><span style=\"color: #8FBCBB\">True<\/span><span style=\"color: #D8DEE9FF\">)<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #8FBCBB\">while<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #8FBCBB\">ap<\/span><span style=\"color: #D8DEE9FF\">.<\/span><span style=\"color: #8FBCBB\">active<\/span><span style=\"color: #D8DEE9FF\">() == <\/span><span style=\"color: #8FBCBB\">False<\/span><span style=\"color: #D8DEE9FF\">:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  <\/span><span style=\"color: #8FBCBB\">pass<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #8FBCBB\">print<\/span><span style=\"color: #D8DEE9FF\">(<\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #A3BE8C\">Connection successful<\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #D8DEE9FF\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #8FBCBB\">print<\/span><span style=\"color: #D8DEE9FF\">(<\/span><span style=\"color: #8FBCBB\">ap<\/span><span style=\"color: #D8DEE9FF\">.<\/span><span style=\"color: #8FBCBB\">ifconfig<\/span><span style=\"color: #D8DEE9FF\">())<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #8FBCBB\">def<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #8FBCBB\">rotateServo<\/span><span style=\"color: #D8DEE9FF\"> ():<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    <\/span><span style=\"color: #8FBCBB\">pwm<\/span><span style=\"color: #D8DEE9FF\">.<\/span><span style=\"color: #8FBCBB\">freq<\/span><span style=\"color: #D8DEE9FF\">(50)<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    <\/span><span style=\"color: #8FBCBB\">pwm<\/span><span style=\"color: #D8DEE9FF\">.<\/span><span style=\"color: #8FBCBB\">duty_ns<\/span><span style=\"color: #D8DEE9FF\">(2000000)<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    <\/span><span style=\"color: #8FBCBB\">sleep<\/span><span style=\"color: #D8DEE9FF\">(0.5)<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    <\/span><span style=\"color: #8FBCBB\">pwm<\/span><span style=\"color: #D8DEE9FF\">.<\/span><span style=\"color: #8FBCBB\">duty_ns<\/span><span style=\"color: #D8DEE9FF\">(1500000)<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">#<\/span><span style=\"color: #8FBCBB\">ap<\/span><span style=\"color: #D8DEE9FF\">.<\/span><span style=\"color: #8FBCBB\">status<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #8FBCBB\">is<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #8FBCBB\">a<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #8FBCBB\">blank<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #8FBCBB\">array<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #8FBCBB\">until<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #8FBCBB\">someone<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #8FBCBB\">connects<\/span><span style=\"color: #ECEFF4\">,<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #8FBCBB\">then<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #8FBCBB\">it<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #8FBCBB\">will<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #8FBCBB\">have<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #8FBCBB\">one<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #8FBCBB\">entry<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">#<\/span><span style=\"color: #8FBCBB\">when<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #8FBCBB\">ap<\/span><span style=\"color: #D8DEE9FF\">.<\/span><span style=\"color: #8FBCBB\">status<\/span><span style=\"color: #D8DEE9FF\"> = <\/span><span style=\"color: #8FBCBB\">true<\/span><span style=\"color: #ECEFF4\">,<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #8FBCBB\">then<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #8FBCBB\">it<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #8FBCBB\">will<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #8FBCBB\">trigger<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #8FBCBB\">rotateServo<\/span><span style=\"color: #D8DEE9FF\">()<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\"># <\/span><span style=\"color: #8FBCBB\">then<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #8FBCBB\">it<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #8FBCBB\">will<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #8FBCBB\">shut<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #8FBCBB\">itself<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #8FBCBB\">off<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #8FBCBB\">to<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #8FBCBB\">kick<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #8FBCBB\">the<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #8FBCBB\">user<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #8FBCBB\">off<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #8FBCBB\">the<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #8FBCBB\">network<\/span><span style=\"color: #ECEFF4\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\"># <\/span><span style=\"color: #8FBCBB\">allowing<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #8FBCBB\">the<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #8FBCBB\">device<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #8FBCBB\">to<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #8FBCBB\">reconnect<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #8FBCBB\">to<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #8FBCBB\">its<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #8FBCBB\">usual<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #8FBCBB\">network<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #8FBCBB\">while<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #8FBCBB\">True<\/span><span style=\"color: #D8DEE9FF\">:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    <\/span><span style=\"color: #8FBCBB\">try<\/span><span style=\"color: #D8DEE9FF\">:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">        <\/span><span style=\"color: #8FBCBB\">if<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #8FBCBB\">ap<\/span><span style=\"color: #D8DEE9FF\">.<\/span><span style=\"color: #8FBCBB\">status<\/span><span style=\"color: #D8DEE9FF\">(<\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #A3BE8C\">stations<\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #D8DEE9FF\">):<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">            <\/span><span style=\"color: #8FBCBB\">print<\/span><span style=\"color: #D8DEE9FF\">(<\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #A3BE8C\">client connected<\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #D8DEE9FF\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">            <\/span><span style=\"color: #8FBCBB\">rotateServo<\/span><span style=\"color: #D8DEE9FF\">()<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">            <\/span><span style=\"color: #8FBCBB\">sleep<\/span><span style=\"color: #D8DEE9FF\">(5)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">            <\/span><span style=\"color: #8FBCBB\">ap<\/span><span style=\"color: #D8DEE9FF\">.<\/span><span style=\"color: #8FBCBB\">active<\/span><span style=\"color: #D8DEE9FF\">(<\/span><span style=\"color: #8FBCBB\">False<\/span><span style=\"color: #D8DEE9FF\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">            <\/span><span style=\"color: #8FBCBB\">sleep<\/span><span style=\"color: #D8DEE9FF\">(2)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">            <\/span><span style=\"color: #8FBCBB\">ap<\/span><span style=\"color: #D8DEE9FF\">.<\/span><span style=\"color: #8FBCBB\">active<\/span><span style=\"color: #D8DEE9FF\">(<\/span><span style=\"color: #8FBCBB\">True<\/span><span style=\"color: #D8DEE9FF\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">        <\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    <\/span><span style=\"color: #8FBCBB\">except<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">OSError<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">as<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #8FBCBB\">e<\/span><span style=\"color: #D8DEE9FF\">:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">        <\/span><span style=\"color: #8FBCBB\">print<\/span><span style=\"color: #D8DEE9FF\">(<\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #A3BE8C\">Connection closed<\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #D8DEE9FF\">)<\/span><\/span>\n<span class=\"line\"><\/span><\/code><\/pre><\/div>\n\n\n\n<p>\u67d0\u4e9b\u91cd\u8981\u7684\u4ee3\u7801\u884c\u9700\u8981\u89e3\u91ca\u3002<\/p>\n\n\n\n<p>\u8fd9\u6bb5\u4ee3\u7801\u5047\u8bbe\u4f60\u628a\u4fe1\u53f7\u7ebf\u8fde\u63a5\u5230GPIO16\u3002\u5982\u679c\u4e0d\u662f\uff0c\u628a\u8fd9\u4e00\u884c\u4e2d\u7684 \"16 \"\u6574\u6570\u6539\u4e3a\u4f60\u6240\u8fde\u63a5\u7684GPIO\u5f15\u811a\u3002<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#2e3440ff\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewbox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" data-code=\"#Pin param = servo GPIO pin numberpwm = PWM(machine.Pin(<strong&gt;16<\/strong&gt;))\" style=\"color:#d8dee9ff;display:none\" aria-label=\"\u62f7\u8d1d\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewbox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code data-no-translation=\"\"><span class=\"line\"><span style=\"color: #D8DEE9FF\">#<\/span><span style=\"color: #D8DEE9\">Pin<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">param<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">servo<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">GPIO<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">pin<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">number<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9\">pwm<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #88C0D0\">PWM<\/span><span style=\"color: #D8DEE9FF\">(<\/span><span style=\"color: #D8DEE9\">machine<\/span><span style=\"color: #ECEFF4\">.<\/span><span style=\"color: #88C0D0\">Pin<\/span><span style=\"color: #D8DEE9FF\">(<\/span><span style=\"color: #81A1C1\">&lt;strong&gt;<\/span><span style=\"color: #D8DEE9FF\">16<\/span><span style=\"color: #81A1C1\">&lt;\/strong&gt;<\/span><span style=\"color: #D8DEE9FF\">))<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>\u8fd9\u5c31\u8bbe\u7f6e\u4e86SoftAP\uff0c\u5ba3\u5e03\u4e86SSID\u540d\u79f0\u548c\u5bc6\u7801\u3002<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#2e3440ff\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewbox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" data-code=\"import network...ssid = 'Lights-Out'password = 'sleeptime'ap = network.WLAN(network.AP_IF)ap.config(essid=ssid, password=password)ap.active(True)\" style=\"color:#d8dee9ff;display:none\" aria-label=\"\u62f7\u8d1d\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewbox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code data-no-translation=\"\"><span class=\"line\"><span style=\"color: #81A1C1\">import<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #8FBCBB\">network<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">...<\/span><\/span>\n<span class=\"line\"><span style=\"color: #8FBCBB\">ssid<\/span><span style=\"color: #D8DEE9FF\"> = <\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #A3BE8C\">Lights-Out<\/span><span style=\"color: #ECEFF4\">&#39;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #8FBCBB\">password<\/span><span style=\"color: #D8DEE9FF\"> = <\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #A3BE8C\">sleeptime<\/span><span style=\"color: #ECEFF4\">&#39;<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #8FBCBB\">ap<\/span><span style=\"color: #D8DEE9FF\"> = <\/span><span style=\"color: #8FBCBB\">network<\/span><span style=\"color: #D8DEE9FF\">.<\/span><span style=\"color: #8FBCBB\">WLAN<\/span><span style=\"color: #D8DEE9FF\">(<\/span><span style=\"color: #8FBCBB\">network<\/span><span style=\"color: #D8DEE9FF\">.<\/span><span style=\"color: #8FBCBB\">AP_IF<\/span><span style=\"color: #D8DEE9FF\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #8FBCBB\">ap<\/span><span style=\"color: #D8DEE9FF\">.<\/span><span style=\"color: #8FBCBB\">config<\/span><span style=\"color: #D8DEE9FF\">(<\/span><span style=\"color: #8FBCBB\">essid<\/span><span style=\"color: #D8DEE9FF\">=<\/span><span style=\"color: #8FBCBB\">ssid<\/span><span style=\"color: #ECEFF4\">,<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #8FBCBB\">password<\/span><span style=\"color: #D8DEE9FF\">=<\/span><span style=\"color: #8FBCBB\">password<\/span><span style=\"color: #D8DEE9FF\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #8FBCBB\">ap<\/span><span style=\"color: #D8DEE9FF\">.<\/span><span style=\"color: #8FBCBB\">active<\/span><span style=\"color: #D8DEE9FF\">(<\/span><span style=\"color: #8FBCBB\">True<\/span><span style=\"color: #D8DEE9FF\">)<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Pico W\u4e0a\u7684\u4f3a\u670d\u63a7\u5236<\/h3>\n\n\n\n<p>\u8fd9\u63a7\u5236\u7740\u4f3a\u670d\u673a\u3002\u4f60\u53ef\u80fd\u9700\u8981\u4fee\u6539\u8fd9\u4e2a\u3002<\/p>\n\n\n\n<p>\u5bf9\u4e8e\u6211\u7684\u4f3a\u670d\u673a\uff0c\u6211\u53ef\u4ee5\u4f7f\u7528500000\uff08500K\uff09\u52302000000\uff082mil\uff09\u7684\u503c\u3002\u8fd9\u5c06\u63d0\u4f9b\u4f3a\u670d\u673a\u7684\u5168\u90e8\u8303\u56f4\u3002<\/p>\n\n\n\n<p>\u7136\u800c\uff0c\u6211\u53ea\u9700\u8981\u5c0f\u5e45\u65cb\u8f6c\u3002\u56e0\u6b64\uff0c\u6211\u628a\u8235\u673a\u653e\u5230\u5b83\u7684\u5168\u901f\u65cb\u8f6c\uff0c\u7528 <strong>pwm.duty_ns(2000000)<\/strong> \u7136\u540e\u8ba9\u5b83\u8fd4\u56de\u5230 <strong>pwm.duty_ns(1500000)<\/strong>.<\/p>\n\n\n\n<p>\u6700\u597d\u662f\u5728\u4f60\u7684\u4f3a\u670d\u673a\u81ea\u7531\u6d6e\u52a8\u65f6\u8fdb\u884c\u6d4b\u8bd5\uff0c\u8fd9\u6837\u4f60\u5c31\u53ef\u4ee5\u770b\u5230\u5b83\u7684\u65cb\u8f6c\u65b9\u5411\u662f\u5426\u6b63\u786e\uff0c\u7136\u540e\u4f60\u5c31\u53ef\u4ee5\u5bf9\u65cb\u8f6c\u5ea6\u8fdb\u884c\u5fae\u8c03\u3002<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#2e3440ff\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewbox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" data-code=\"def rotateServo ():    pwm.freq(50)    pwm.duty_ns(2000000)    sleep(0.5)    pwm.duty_ns(1500000)\" style=\"color:#d8dee9ff;display:none\" aria-label=\"\u62f7\u8d1d\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewbox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code data-no-translation=\"\"><span class=\"line\"><span style=\"color: #D8DEE9\">def<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #88C0D0\">rotateServo<\/span><span style=\"color: #D8DEE9FF\"> ():<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    <\/span><span style=\"color: #D8DEE9\">pwm<\/span><span style=\"color: #ECEFF4\">.<\/span><span style=\"color: #88C0D0\">freq<\/span><span style=\"color: #D8DEE9FF\">(<\/span><span style=\"color: #B48EAD\">50<\/span><span style=\"color: #D8DEE9FF\">)<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    <\/span><span style=\"color: #D8DEE9\">pwm<\/span><span style=\"color: #ECEFF4\">.<\/span><span style=\"color: #88C0D0\">duty_ns<\/span><span style=\"color: #D8DEE9FF\">(<\/span><span style=\"color: #B48EAD\">2000000<\/span><span style=\"color: #D8DEE9FF\">)<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    <\/span><span style=\"color: #88C0D0\">sleep<\/span><span style=\"color: #D8DEE9FF\">(<\/span><span style=\"color: #B48EAD\">0.5<\/span><span style=\"color: #D8DEE9FF\">)<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    <\/span><span style=\"color: #D8DEE9\">pwm<\/span><span style=\"color: #ECEFF4\">.<\/span><span style=\"color: #88C0D0\">duty_ns<\/span><span style=\"color: #D8DEE9FF\">(<\/span><span style=\"color: #B48EAD\">1500000<\/span><span style=\"color: #D8DEE9FF\">)<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">\u5e7f\u64ad\u4e00\u4e2aAP\uff0c\u8fde\u63a5\u65f6\u89e6\u53d1\u65cb\u8f6cServo<\/h2>\n\n\n\n<p>\u8fd9\u884c\u4ee3\u7801\u53cd\u590d\u8fd0\u884c\u3002<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#2e3440ff\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewbox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" data-code=\"while True:    try:        if ap.status('stations'):            print('client connected')            rotateServo()            sleep(10)            ap.active(False)            sleep(2)            ap.active(True)\" style=\"color:#d8dee9ff;display:none\" aria-label=\"\u62f7\u8d1d\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewbox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code data-no-translation=\"\"><span class=\"line\"><span style=\"color: #81A1C1\">while<\/span><span style=\"color: #D8DEE9FF\"> True<\/span><span style=\"color: #ECEFF4\">:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    <\/span><span style=\"color: #81A1C1\">try<\/span><span style=\"color: #D8DEE9FF\">:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">        <\/span><span style=\"color: #81A1C1\">if<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">ap<\/span><span style=\"color: #ECEFF4\">.<\/span><span style=\"color: #88C0D0\">status<\/span><span style=\"color: #D8DEE9FF\">(<\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #A3BE8C\">stations<\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #D8DEE9FF\">):<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">            <\/span><span style=\"color: #88C0D0\">print<\/span><span style=\"color: #D8DEE9FF\">(<\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #A3BE8C\">client connected<\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #D8DEE9FF\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">            <\/span><span style=\"color: #88C0D0\">rotateServo<\/span><span style=\"color: #D8DEE9FF\">()<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">            <\/span><span style=\"color: #88C0D0\">sleep<\/span><span style=\"color: #D8DEE9FF\">(<\/span><span style=\"color: #B48EAD\">10<\/span><span style=\"color: #D8DEE9FF\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">            <\/span><span style=\"color: #D8DEE9\">ap<\/span><span style=\"color: #ECEFF4\">.<\/span><span style=\"color: #88C0D0\">active<\/span><span style=\"color: #D8DEE9FF\">(<\/span><span style=\"color: #D8DEE9\">False<\/span><span style=\"color: #D8DEE9FF\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">            <\/span><span style=\"color: #88C0D0\">sleep<\/span><span style=\"color: #D8DEE9FF\">(<\/span><span style=\"color: #B48EAD\">2<\/span><span style=\"color: #D8DEE9FF\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">            <\/span><span style=\"color: #D8DEE9\">ap<\/span><span style=\"color: #ECEFF4\">.<\/span><span style=\"color: #88C0D0\">active<\/span><span style=\"color: #D8DEE9FF\">(<\/span><span style=\"color: #D8DEE9\">True<\/span><span style=\"color: #D8DEE9FF\">)<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>\u5982\u679c <strong>ap.status('stations')<\/strong> \u68c0\u6d4b\u5230\u65e0\u7ebf\u7f51\u7edc\u7684\u8fde\u63a5\uff0c\u5b83\u5c06\u8fd4\u56de\u4e00\u4e2a\u5305\u542b\u4e00\u4e2a\u9879\u76ee\u7684\u6570\u7ec4\u3002<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/07\/image-56.png\" alt=\"\" class=\"wp-image-2840\" style=\"width:488px;height:261px\" width=\"488\" height=\"261\" srcset=\"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/07\/image-56.png 634w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/07\/image-56-300x160.png 300w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/07\/image-56-18x10.png 18w\" sizes=\"auto, (max-width: 488px) 100vw, 488px\" \/><figcaption class=\"wp-element-caption\"> <strong>ap.status('stations')<\/strong> \u5982\u679c\u6ca1\u6709\u4eba\u8fde\u63a5\u5230AP\uff0c\u5219\u8fd4\u56de\u4e00\u4e2a\u7a7a\u6570\u7ec4\u3002<\/figcaption><\/figure>\n<\/div>\n\n\n<p>\u56e0\u6b64\uff0c\u5982\u679c\u4ee3\u7801\u4e0d\u662f\u4e00\u4e2a\u7a7a\u6570\u7ec4\uff0c\u5c31\u4f1a\u542f\u52a8 <strong>\u65cb\u8f6c\u4f3a\u670d<\/strong> \u5e76\u5728\u518d\u6b21\u5f00\u673a\u524d\u5173\u95edAP\u3002<\/p>\n\n\n\n<p>\u5f00\u542f\u548c\u5173\u95edAP\u7684\u60f3\u6cd5\u662f\u5c06\u8fde\u63a5\u7684\u5ba2\u6237\u7aef\u8e22\u51fa\u7f51\u7edc\u3002\u8fd9\u6837\u5b83\u5c31\u53ef\u4ee5\u901a\u8fc7\u4e92\u8054\u7f51\u8fde\u63a5\u5230\u5176\u4e60\u60ef\u7684\u7f51\u7edc\u4e0a\u3002 <\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/07\/auto-reconnect-off.jpg\" alt=\"\u5b89\u5353\u7cfb\u7edf\u81ea\u52a8\u91cd\u65b0\u8fde\u63a5\u5173\u95ed\" class=\"wp-image-2850\" style=\"width:429px;height:260px\" width=\"429\" height=\"260\" srcset=\"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/07\/auto-reconnect-off.jpg 720w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/07\/auto-reconnect-off-300x182.jpg 300w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/07\/auto-reconnect-off-18x12.jpg 18w\" sizes=\"auto, (max-width: 429px) 100vw, 429px\" \/><figcaption class=\"wp-element-caption\">\u5b89\u5353\u7cfb\u7edf\u4e2d\u7684\u81ea\u52a8\u91cd\u65b0\u8fde\u63a5\u88ab\u5173\u95ed<\/figcaption><\/figure>\n<\/div>\n\n\n<p>\u53ea\u8981\u786e\u4fdd\u5728\u4f60\u7684\u624b\u673a\u6216\u7535\u8111\u4e2d\u5173\u95ed\u81ea\u52a8\u91cd\u65b0\u8fde\u63a5\u3002<\/p>\n\n\n\n<p>\u4e3a\u4ec0\u4e48\u6211\u4eec\u9700\u8981\u5728\u8c03\u7528ap.active()\u4e4b\u95f4\u8bbe\u7f6esleep(x)\uff1f\u8fd9\u662f\u56e0\u4e3a\u6211\u4e86\u89e3\u5230\uff0c\u5982\u679c\u6211\u5173\u95ed\u548c\u5f00\u542fAP\u7684\u901f\u5ea6\u592a\u5feb\uff0c\u6211\u7684\u624b\u673a\u5c31\u4e0d\u4f1a\u653e\u5f03\u8fde\u63a5\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u4e86\u89e3\u66f4\u591a\u5173\u4e8eRaspberry Pi Pico W\u7684\u4fe1\u606f<\/h2>\n\n\n\n<p>\u6211\u4eec\u4e13\u95e8\u5199\u4e86\u4e00\u7bc7\u5173\u4e8eRaspberry Pi Pico W\u7684\u6587\u7ae0\uff0c\u5c06\u5e2e\u52a9\u4f60\u5145\u5206\u5229\u7528\u4f60\u7684Pico W\u3002 <a href=\"https:\/\/picockpit.com\/raspberry-pi\/everything-about-the-raspberry-pi-pico-w\/\">\u70b9\u51fb\u8fd9\u91cc\uff0c\u4e86\u89e3\u4f60\u6240\u4e0d\u77e5\u9053\u7684\u4e8b\u60c5\u3002<\/a><\/p>\n\n\n\n<p><\/p>\n<div class=\"shariff shariff-align-center shariff-widget-align-left shariff-buttonstretch\"><ul class=\"shariff-buttons theme-white orientation-horizontal buttonsize-medium\"><li class=\"shariff-button twitter shariff-nocustomcolor\" style=\"background-color:#595959\"><a href=\"https:\/\/twitter.com\/share?url=https%3A%2F%2Fpicockpit.com%2Fraspberry-pi%2Fzh%2Fdiy-wireless-servo-switch-controller-with-raspberry-pi-pico-w%2F&text=DIY%20wireless%20servo%20switch%20controller%20with%20Raspberry%20Pi%20Pico%20W\" title=\"\u5728 X \u4e0a\u5206\u4eab\" aria-label=\"\u5728 X \u4e0a\u5206\u4eab\" role=\"button\" rel=\"noopener nofollow\" class=\"shariff-link\" style=\"; background-color:#000; color:#000\" target=\"_blank\"><span class=\"shariff-icon\" style=\"fill:#000\"><svg width=\"32px\" height=\"20px\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewbox=\"0 0 24 24\"><path fill=\"#000\" d=\"M14.258 10.152L23.176 0h-2.113l-7.747 8.813L7.133 0H0l9.352 13.328L0 23.973h2.113l8.176-9.309 6.531 9.309h7.133zm-2.895 3.293l-.949-1.328L2.875 1.56h3.246l6.086 8.523.945 1.328 7.91 11.078h-3.246zm0 0\"\/><\/svg><\/span><span class=\"shariff-text\" style=\"color:#000\">\u5206\u4eab<\/span>&nbsp;<\/a><\/li><li class=\"shariff-button facebook shariff-nocustomcolor\" style=\"background-color:#4273c8\"><a href=\"https:\/\/www.facebook.com\/sharer\/sharer.php?u=https%3A%2F%2Fpicockpit.com%2Fraspberry-pi%2Fzh%2Fdiy-wireless-servo-switch-controller-with-raspberry-pi-pico-w%2F\" title=\"\u5728Facebook\u4e0a\u5206\u4eab\" aria-label=\"\u5728Facebook\u4e0a\u5206\u4eab\" role=\"button\" rel=\"nofollow\" class=\"shariff-link\" style=\"; background-color:#3b5998; color:#3b5998\" target=\"_blank\"><span class=\"shariff-icon\" style=\"fill:#3b5998\"><svg width=\"32px\" height=\"20px\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewbox=\"0 0 18 32\"><path fill=\"#3b5998\" d=\"M17.1 0.2v4.7h-2.8q-1.5 0-2.1 0.6t-0.5 1.9v3.4h5.2l-0.7 5.3h-4.5v13.6h-5.5v-13.6h-4.5v-5.3h4.5v-3.9q0-3.3 1.9-5.2t5-1.8q2.6 0 4.1 0.2z\"\/><\/svg><\/span><span class=\"shariff-text\" style=\"color:#3b5998\">\u5206\u4eab<\/span>&nbsp;<\/a><\/li><li class=\"shariff-button telegram shariff-nocustomcolor\" style=\"background-color:#4084A6\"><a href=\"https:\/\/telegram.me\/share\/url?url=https%3A%2F%2Fpicockpit.com%2Fraspberry-pi%2Fzh%2Fdiy-wireless-servo-switch-controller-with-raspberry-pi-pico-w%2F&text=DIY%20wireless%20servo%20switch%20controller%20with%20Raspberry%20Pi%20Pico%20W\" title=\"\u5728\u7535\u62a5\u4e0a\u5206\u4eab\" aria-label=\"\u5728\u7535\u62a5\u4e0a\u5206\u4eab\" role=\"button\" rel=\"noopener nofollow\" class=\"shariff-link\" style=\"; background-color:#0088cc; color:#0088cc\" target=\"_blank\"><span class=\"shariff-icon\" style=\"fill:#0088cc\"><svg width=\"32px\" height=\"20px\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewbox=\"0 0 32 32\"><path fill=\"#0088cc\" d=\"M30.8 6.5l-4.5 21.4c-.3 1.5-1.2 1.9-2.5 1.2L16.9 24l-3.3 3.2c-.4.4-.7.7-1.4.7l.5-7L25.5 9.2c.6-.5-.1-.8-.9-.3l-15.8 10L2 16.7c-1.5-.5-1.5-1.5.3-2.2L28.9 4.3c1.3-.5 2.3.3 1.9 2.2z\"\/><\/svg><\/span><span class=\"shariff-text\" style=\"color:#0088cc\">\u5206\u4eab<\/span>&nbsp;<\/a><\/li><li class=\"shariff-button reddit shariff-nocustomcolor\" style=\"background-color:#ff5700\"><a href=\"https:\/\/www.reddit.com\/submit?url=https%3A%2F%2Fpicockpit.com%2Fraspberry-pi%2Fzh%2Fdiy-wireless-servo-switch-controller-with-raspberry-pi-pico-w%2F\" title=\"\u5206\u4eab\u81f3Reddit\" aria-label=\"\u5206\u4eab\u81f3Reddit\" role=\"button\" rel=\"noopener nofollow\" class=\"shariff-link\" style=\"; background-color:#ff4500; color:#ff4500\" target=\"_blank\"><span class=\"shariff-icon\" style=\"fill:#ff4500\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewbox=\"0 0 512 512\"><path fill=\"#ff4500\" d=\"M440.3 203.5c-15 0-28.2 6.2-37.9 15.9-35.7-24.7-83.8-40.6-137.1-42.3L293 52.3l88.2 19.8c0 21.6 17.6 39.2 39.2 39.2 22 0 39.7-18.1 39.7-39.7s-17.6-39.7-39.7-39.7c-15.4 0-28.7 9.3-35.3 22l-97.4-21.6c-4.9-1.3-9.7 2.2-11 7.1L246.3 177c-52.9 2.2-100.5 18.1-136.3 42.8-9.7-10.1-23.4-16.3-38.4-16.3-55.6 0-73.8 74.6-22.9 100.1-1.8 7.9-2.6 16.3-2.6 24.7 0 83.8 94.4 151.7 210.3 151.7 116.4 0 210.8-67.9 210.8-151.7 0-8.4-.9-17.2-3.1-25.1 49.9-25.6 31.5-99.7-23.8-99.7zM129.4 308.9c0-22 17.6-39.7 39.7-39.7 21.6 0 39.2 17.6 39.2 39.7 0 21.6-17.6 39.2-39.2 39.2-22 .1-39.7-17.6-39.7-39.2zm214.3 93.5c-36.4 36.4-139.1 36.4-175.5 0-4-3.5-4-9.7 0-13.7 3.5-3.5 9.7-3.5 13.2 0 27.8 28.5 120 29 149 0 3.5-3.5 9.7-3.5 13.2 0 4.1 4 4.1 10.2.1 13.7zm-.8-54.2c-21.6 0-39.2-17.6-39.2-39.2 0-22 17.6-39.7 39.2-39.7 22 0 39.7 17.6 39.7 39.7-.1 21.5-17.7 39.2-39.7 39.2z\"\/><\/svg><\/span><span class=\"shariff-text\" style=\"color:#ff4500\">\u5206\u4eab<\/span>&nbsp;<\/a><\/li><\/ul><\/div>","protected":false},"excerpt":{"rendered":"<p>\u6211\u9047\u5230\u7684\u6700\u5927\u95ee\u9898\u4e4b\u4e00\u662f\u4ece\u5e8a\u4e0a\u722c\u8d77\u6765\u5173\u6389\u5367\u5ba4\u7684\u706f\u3002\u5f53\u4f60\u60ec\u610f\u5730\u8eba\u5728\u5e8a\u4e0a\u65f6\uff0c\u5f88\u96be\u505a\u5230\u8fd9\u4e00\u70b9\u3002\u5728\u8fd9\u91cc\uff0c\u6211\u60f3\u544a\u8bc9\u5927\u5bb6\u5982\u4f55\u7528 Pico W \u4f3a\u670d\u5f00\u5173\u63a7\u5236\u5668\u6765\u89e3\u51b3\u8fd9\u4e2a\u95ee\u9898\u3002\u51e0\u5e74\u524d\uff0c...<\/p>","protected":false},"author":2,"featured_media":2854,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10,3],"tags":[425,545,543,11,221,486,447,187,484,544],"class_list":["post-2824","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-raspberry-pi-pico","category-raspberry-pi-how-to","tag-light","tag-lights","tag-microservo","tag-pico","tag-pico-w","tag-project","tag-projects","tag-raspberry-pi","tag-servo","tag-sg90"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>DIY wireless servo switch controller with Raspberry Pi Pico W | PiCockpit<\/title>\n<meta name=\"description\" content=\"Make DIY wireless servo switch controller to turn off light switches, appliances and much more with the Raspberry Pi Pico W and SoftAP!\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/picockpit.com\/raspberry-pi\/zh\/diy-wireless-servo-switch-controller-with-raspberry-pi-pico-w\/\" \/>\n<meta property=\"og:locale\" content=\"zh_HK\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"DIY wireless servo switch controller with Raspberry Pi Pico W | PiCockpit\" \/>\n<meta property=\"og:description\" content=\"Make DIY wireless servo switch controller to turn off light switches, appliances and much more with the Raspberry Pi Pico W and SoftAP!\" \/>\n<meta property=\"og:url\" content=\"https:\/\/picockpit.com\/raspberry-pi\/zh\/diy-wireless-servo-switch-controller-with-raspberry-pi-pico-w\/\" \/>\n<meta property=\"og:site_name\" content=\"PiCockpit\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/pi3gshop\" \/>\n<meta property=\"article:published_time\" content=\"2022-07-19T12:43:06+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-08-22T14:46:06+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/07\/featured-image-4.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1778\" \/>\n\t<meta property=\"og:image:height\" content=\"1000\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"raspi berry\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@pi3g\" \/>\n<meta name=\"twitter:site\" content=\"@pi3g\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"raspi berry\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9810\u8a08\u95b1\u8b80\u6642\u9593\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 \u5206\u9418\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/diy-wireless-servo-switch-controller-with-raspberry-pi-pico-w\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/diy-wireless-servo-switch-controller-with-raspberry-pi-pico-w\\\/\"},\"author\":{\"name\":\"raspi berry\",\"@id\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/#\\\/schema\\\/person\\\/7af3a7a8c999bc722029ef9ca9d78eee\"},\"headline\":\"DIY wireless servo switch controller with Raspberry Pi Pico W\",\"datePublished\":\"2022-07-19T12:43:06+00:00\",\"dateModified\":\"2023-08-22T14:46:06+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/diy-wireless-servo-switch-controller-with-raspberry-pi-pico-w\\\/\"},\"wordCount\":1308,\"commentCount\":2,\"publisher\":{\"@id\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/diy-wireless-servo-switch-controller-with-raspberry-pi-pico-w\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/wp-content\\\/uploads\\\/2022\\\/07\\\/featured-image-4.jpg\",\"keywords\":[\"light\",\"lights\",\"microservo\",\"Pico\",\"Pico W\",\"project\",\"Projects\",\"Raspberry Pi\",\"servo\",\"SG90\"],\"articleSection\":[\"Raspberry Pi Pico\",\"Tutorials\"],\"inLanguage\":\"zh-HK\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/diy-wireless-servo-switch-controller-with-raspberry-pi-pico-w\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/diy-wireless-servo-switch-controller-with-raspberry-pi-pico-w\\\/\",\"url\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/diy-wireless-servo-switch-controller-with-raspberry-pi-pico-w\\\/\",\"name\":\"DIY wireless servo switch controller with Raspberry Pi Pico W | PiCockpit\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/diy-wireless-servo-switch-controller-with-raspberry-pi-pico-w\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/diy-wireless-servo-switch-controller-with-raspberry-pi-pico-w\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/wp-content\\\/uploads\\\/2022\\\/07\\\/featured-image-4.jpg\",\"datePublished\":\"2022-07-19T12:43:06+00:00\",\"dateModified\":\"2023-08-22T14:46:06+00:00\",\"description\":\"Make DIY wireless servo switch controller to turn off light switches, appliances and much more with the Raspberry Pi Pico W and SoftAP!\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/diy-wireless-servo-switch-controller-with-raspberry-pi-pico-w\\\/#breadcrumb\"},\"inLanguage\":\"zh-HK\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/diy-wireless-servo-switch-controller-with-raspberry-pi-pico-w\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-HK\",\"@id\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/diy-wireless-servo-switch-controller-with-raspberry-pi-pico-w\\\/#primaryimage\",\"url\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/wp-content\\\/uploads\\\/2022\\\/07\\\/featured-image-4.jpg\",\"contentUrl\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/wp-content\\\/uploads\\\/2022\\\/07\\\/featured-image-4.jpg\",\"width\":1778,\"height\":1000,\"caption\":\"DIY wireless servo switch controller with Raspberry Pi Pico W\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/diy-wireless-servo-switch-controller-with-raspberry-pi-pico-w\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Tutorials\",\"item\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/category\\\/raspberry-pi-how-to\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"DIY wireless servo switch controller with Raspberry Pi Pico W\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/#website\",\"url\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/\",\"name\":\"PiCockpit\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"zh-HK\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/#organization\",\"name\":\"PiCockpit.com\",\"url\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-HK\",\"@id\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/wp-content\\\/uploads\\\/2023\\\/07\\\/Screenshot-from-2023-07-24-15-01-24.png\",\"contentUrl\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/wp-content\\\/uploads\\\/2023\\\/07\\\/Screenshot-from-2023-07-24-15-01-24.png\",\"width\":1165,\"height\":283,\"caption\":\"PiCockpit.com\"},\"image\":{\"@id\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/pi3gshop\",\"https:\\\/\\\/x.com\\\/pi3g\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/#\\\/schema\\\/person\\\/7af3a7a8c999bc722029ef9ca9d78eee\",\"name\":\"raspi berry\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-HK\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/c10c423ceeff34163dd54a5472d6da17d71c0e360e0cf8cdb8847006372f216b?s=96&d=blank&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/c10c423ceeff34163dd54a5472d6da17d71c0e360e0cf8cdb8847006372f216b?s=96&d=blank&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/c10c423ceeff34163dd54a5472d6da17d71c0e360e0cf8cdb8847006372f216b?s=96&d=blank&r=g\",\"caption\":\"raspi berry\"},\"description\":\"I'm here to help you with all your Raspberry Pi related questions &amp; love to share about new project ideas for the Raspberry Pi, and give quick tips. Of course I'll also help you with PiCockpit and how to make your Raspberry Pi even easier to use with this raspberry pi monitoring solution :-)\",\"sameAs\":[\"https:\\\/\\\/picockpit.com\"],\"url\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/zh\\\/author\\\/raspi-berry\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u7528 Raspberry Pi Pico W DIY \u65e0\u7ebf\u4f3a\u670d\u5f00\u5173\u63a7\u5236\u5668 | PiCockpit","description":"\u7528Raspberry Pi Pico W\u548cSoftAP\u5236\u4f5cDIY\u65e0\u7ebf\u4f3a\u670d\u5f00\u5173\u63a7\u5236\u5668\uff0c\u4ee5\u5173\u95ed\u7535\u706f\u5f00\u5173\u3001\u7535\u5668\u7b49\u3002","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/picockpit.com\/raspberry-pi\/zh\/diy-wireless-servo-switch-controller-with-raspberry-pi-pico-w\/","og_locale":"zh_HK","og_type":"article","og_title":"DIY wireless servo switch controller with Raspberry Pi Pico W | PiCockpit","og_description":"Make DIY wireless servo switch controller to turn off light switches, appliances and much more with the Raspberry Pi Pico W and SoftAP!","og_url":"https:\/\/picockpit.com\/raspberry-pi\/zh\/diy-wireless-servo-switch-controller-with-raspberry-pi-pico-w\/","og_site_name":"PiCockpit","article_publisher":"https:\/\/www.facebook.com\/pi3gshop","article_published_time":"2022-07-19T12:43:06+00:00","article_modified_time":"2023-08-22T14:46:06+00:00","og_image":[{"width":1778,"height":1000,"url":"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/07\/featured-image-4.jpg","type":"image\/jpeg"}],"author":"raspi berry","twitter_card":"summary_large_image","twitter_creator":"@pi3g","twitter_site":"@pi3g","twitter_misc":{"\u4f5c\u8005":"raspi berry","\u9810\u8a08\u95b1\u8b80\u6642\u9593":"8 \u5206\u9418"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/picockpit.com\/raspberry-pi\/diy-wireless-servo-switch-controller-with-raspberry-pi-pico-w\/#article","isPartOf":{"@id":"https:\/\/picockpit.com\/raspberry-pi\/diy-wireless-servo-switch-controller-with-raspberry-pi-pico-w\/"},"author":{"name":"raspi berry","@id":"https:\/\/picockpit.com\/raspberry-pi\/#\/schema\/person\/7af3a7a8c999bc722029ef9ca9d78eee"},"headline":"DIY wireless servo switch controller with Raspberry Pi Pico W","datePublished":"2022-07-19T12:43:06+00:00","dateModified":"2023-08-22T14:46:06+00:00","mainEntityOfPage":{"@id":"https:\/\/picockpit.com\/raspberry-pi\/diy-wireless-servo-switch-controller-with-raspberry-pi-pico-w\/"},"wordCount":1308,"commentCount":2,"publisher":{"@id":"https:\/\/picockpit.com\/raspberry-pi\/#organization"},"image":{"@id":"https:\/\/picockpit.com\/raspberry-pi\/diy-wireless-servo-switch-controller-with-raspberry-pi-pico-w\/#primaryimage"},"thumbnailUrl":"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/07\/featured-image-4.jpg","keywords":["light","lights","microservo","Pico","Pico W","project","Projects","Raspberry Pi","servo","SG90"],"articleSection":["Raspberry Pi Pico","Tutorials"],"inLanguage":"zh-HK","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/picockpit.com\/raspberry-pi\/diy-wireless-servo-switch-controller-with-raspberry-pi-pico-w\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/picockpit.com\/raspberry-pi\/diy-wireless-servo-switch-controller-with-raspberry-pi-pico-w\/","url":"https:\/\/picockpit.com\/raspberry-pi\/diy-wireless-servo-switch-controller-with-raspberry-pi-pico-w\/","name":"\u7528 Raspberry Pi Pico W DIY \u65e0\u7ebf\u4f3a\u670d\u5f00\u5173\u63a7\u5236\u5668 | PiCockpit","isPartOf":{"@id":"https:\/\/picockpit.com\/raspberry-pi\/#website"},"primaryImageOfPage":{"@id":"https:\/\/picockpit.com\/raspberry-pi\/diy-wireless-servo-switch-controller-with-raspberry-pi-pico-w\/#primaryimage"},"image":{"@id":"https:\/\/picockpit.com\/raspberry-pi\/diy-wireless-servo-switch-controller-with-raspberry-pi-pico-w\/#primaryimage"},"thumbnailUrl":"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/07\/featured-image-4.jpg","datePublished":"2022-07-19T12:43:06+00:00","dateModified":"2023-08-22T14:46:06+00:00","description":"\u7528Raspberry Pi Pico W\u548cSoftAP\u5236\u4f5cDIY\u65e0\u7ebf\u4f3a\u670d\u5f00\u5173\u63a7\u5236\u5668\uff0c\u4ee5\u5173\u95ed\u7535\u706f\u5f00\u5173\u3001\u7535\u5668\u7b49\u3002","breadcrumb":{"@id":"https:\/\/picockpit.com\/raspberry-pi\/diy-wireless-servo-switch-controller-with-raspberry-pi-pico-w\/#breadcrumb"},"inLanguage":"zh-HK","potentialAction":[{"@type":"ReadAction","target":["https:\/\/picockpit.com\/raspberry-pi\/diy-wireless-servo-switch-controller-with-raspberry-pi-pico-w\/"]}]},{"@type":"ImageObject","inLanguage":"zh-HK","@id":"https:\/\/picockpit.com\/raspberry-pi\/diy-wireless-servo-switch-controller-with-raspberry-pi-pico-w\/#primaryimage","url":"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/07\/featured-image-4.jpg","contentUrl":"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/07\/featured-image-4.jpg","width":1778,"height":1000,"caption":"DIY wireless servo switch controller with Raspberry Pi Pico W"},{"@type":"BreadcrumbList","@id":"https:\/\/picockpit.com\/raspberry-pi\/diy-wireless-servo-switch-controller-with-raspberry-pi-pico-w\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/picockpit.com\/raspberry-pi\/"},{"@type":"ListItem","position":2,"name":"Tutorials","item":"https:\/\/picockpit.com\/raspberry-pi\/category\/raspberry-pi-how-to\/"},{"@type":"ListItem","position":3,"name":"DIY wireless servo switch controller with Raspberry Pi Pico W"}]},{"@type":"WebSite","@id":"https:\/\/picockpit.com\/raspberry-pi\/#website","url":"https:\/\/picockpit.com\/raspberry-pi\/","name":"\u7801\u5934","description":"","publisher":{"@id":"https:\/\/picockpit.com\/raspberry-pi\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/picockpit.com\/raspberry-pi\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"zh-HK"},{"@type":"Organization","@id":"https:\/\/picockpit.com\/raspberry-pi\/#organization","name":"PiCockpit.com","url":"https:\/\/picockpit.com\/raspberry-pi\/","logo":{"@type":"ImageObject","inLanguage":"zh-HK","@id":"https:\/\/picockpit.com\/raspberry-pi\/#\/schema\/logo\/image\/","url":"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2023\/07\/Screenshot-from-2023-07-24-15-01-24.png","contentUrl":"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2023\/07\/Screenshot-from-2023-07-24-15-01-24.png","width":1165,"height":283,"caption":"PiCockpit.com"},"image":{"@id":"https:\/\/picockpit.com\/raspberry-pi\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/pi3gshop","https:\/\/x.com\/pi3g"]},{"@type":"Person","@id":"https:\/\/picockpit.com\/raspberry-pi\/#\/schema\/person\/7af3a7a8c999bc722029ef9ca9d78eee","name":"raspi berry","image":{"@type":"ImageObject","inLanguage":"zh-HK","@id":"https:\/\/secure.gravatar.com\/avatar\/c10c423ceeff34163dd54a5472d6da17d71c0e360e0cf8cdb8847006372f216b?s=96&d=blank&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/c10c423ceeff34163dd54a5472d6da17d71c0e360e0cf8cdb8847006372f216b?s=96&d=blank&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/c10c423ceeff34163dd54a5472d6da17d71c0e360e0cf8cdb8847006372f216b?s=96&d=blank&r=g","caption":"raspi berry"},"description":"\u6211\u5728\u8fd9\u91cc\u5e2e\u52a9\u4f60\u89e3\u51b3\u6240\u6709\u4e0e\u6811\u8393\u6d3e\u6709\u5173\u7684\u95ee\u9898\uff0c\u5e76\u559c\u6b22\u5206\u4eab\u6709\u5173\u6811\u8393\u6d3e\u7684\u65b0\u9879\u76ee\u60f3\u6cd5\uff0c\u5e76\u7ed9\u51fa\u5feb\u901f\u63d0\u793a\u3002\u5f53\u7136\uff0c\u6211\u4e5f\u4f1a\u5e2e\u52a9\u4f60\u4e86\u89e3PiCockpit\uff0c\u4ee5\u53ca\u5982\u4f55\u5229\u7528\u8fd9\u4e2a\u6811\u8393\u6d3e\u76d1\u63a7\u89e3\u51b3\u65b9\u6848\u4f7f\u4f60\u7684\u6811\u8393\u6d3e\u66f4\u5bb9\u6613\u4f7f\u7528 :-)","sameAs":["https:\/\/picockpit.com"],"url":"https:\/\/picockpit.com\/raspberry-pi\/zh\/author\/raspi-berry\/"}]}},"_links":{"self":[{"href":"https:\/\/picockpit.com\/raspberry-pi\/zh\/wp-json\/wp\/v2\/posts\/2824","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/picockpit.com\/raspberry-pi\/zh\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/picockpit.com\/raspberry-pi\/zh\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/picockpit.com\/raspberry-pi\/zh\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/picockpit.com\/raspberry-pi\/zh\/wp-json\/wp\/v2\/comments?post=2824"}],"version-history":[{"count":26,"href":"https:\/\/picockpit.com\/raspberry-pi\/zh\/wp-json\/wp\/v2\/posts\/2824\/revisions"}],"predecessor-version":[{"id":4877,"href":"https:\/\/picockpit.com\/raspberry-pi\/zh\/wp-json\/wp\/v2\/posts\/2824\/revisions\/4877"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/picockpit.com\/raspberry-pi\/zh\/wp-json\/wp\/v2\/media\/2854"}],"wp:attachment":[{"href":"https:\/\/picockpit.com\/raspberry-pi\/zh\/wp-json\/wp\/v2\/media?parent=2824"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/picockpit.com\/raspberry-pi\/zh\/wp-json\/wp\/v2\/categories?post=2824"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/picockpit.com\/raspberry-pi\/zh\/wp-json\/wp\/v2\/tags?post=2824"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}