{"id":1179,"date":"2021-04-28T22:33:38","date_gmt":"2021-04-28T13:33:38","guid":{"rendered":"https:\/\/www.ekit-tech.com\/?p=1179"},"modified":"2021-12-06T21:50:13","modified_gmt":"2021-12-06T12:50:13","slug":"%e3%83%88%e3%82%b0%e3%83%ab%e3%82%b9%e3%82%a4%e3%83%83%e3%83%81%e3%81%a7%e3%83%a9%e3%82%ba%e3%83%91%e3%82%a4zero%e3%81%ae%e9%9b%bb%e6%ba%90%e3%82%92%e3%82%aa%e3%83%95%e3%81%ab%e3%81%99%e3%82%8b","status":"publish","type":"post","link":"https:\/\/www.ekit-tech.com\/?p=1179","title":{"rendered":"\u30c8\u30b0\u30eb\u30b9\u30a4\u30c3\u30c1\u3067\u30e9\u30ba\u30d1\u30a4ZERO\u306e\u96fb\u6e90\u3092\u30aa\u30d5\u306b\u3059\u308b"},"content":{"rendered":"\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/www.ekit-tech.com\/wp-content\/uploads\/20210427-14.jpg\"><img loading=\"lazy\" width=\"1200\" height=\"800\" src=\"https:\/\/www.ekit-tech.com\/wp-content\/uploads\/20210427-14.jpg\" alt=\"\u30c8\u30b0\u30eb\u30b9\u30a4\u30c3\u30c1\" class=\"wp-image-1182\" srcset=\"https:\/\/www.ekit-tech.com\/wp-content\/uploads\/20210427-14.jpg 1200w, https:\/\/www.ekit-tech.com\/wp-content\/uploads\/20210427-14-300x200.jpg 300w, https:\/\/www.ekit-tech.com\/wp-content\/uploads\/20210427-14-768x512.jpg 768w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" \/><\/a><\/figure>\n\n\n\n<p>\u3053\u308c\u304b\u3089\u7d39\u4ecb\u3059\u308b\u65b9\u6cd5\u304c\u3001\u304a\u305d\u3089\u304f\u6700\u3082\u30b7\u30f3\u30d7\u30eb\u306b\u300c\u30c8\u30b0\u30eb\u30b9\u30a4\u30c3\u30c1\u3067\u30e9\u30ba\u30d1\u30a4ZERO\u306e\u96fb\u6e90\u3092\u30aa\u30d5\u3067\u304d\u308b\u65b9\u6cd5\u300d\u3060\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<\/div><h2>\u56de\u8def\u56f3<\/h2><div class=\"inner\">\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/www.ekit-tech.com\/wp-content\/uploads\/20210427-15.jpg\"><img src=\"https:\/\/www.ekit-tech.com\/wp-content\/uploads\/20210427-15.jpg\" alt=\"\u30c8\u30b0\u30eb\u30b9\u30a4\u30c3\u30c1\u3067\u30e9\u30ba\u30d1\u30a4ZERO\u306e\u96fb\u6e90\u3092\u30aa\u30d5\u306b\u3059\u308b\u56de\u8def\" class=\"wp-image-1184\"\/><\/a><\/figure>\n\n\n\n<p>\u30b9\u30a4\u30c3\u30c1\u3092\u5207\u308a\u66ff\u3048\u308b\u3068\u3001\u30e9\u30ba\u30d1\u30a4\u306eGPIO16\u30d4\u30f3\u306b\u3001\u96fb\u6e90\u304b\u3089\u96fb\u6d41\u3092\u6d41\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"sp2\">\u305f\u3060\u3057\u3001\u30e9\u30ba\u30d1\u30a4\u306eGPIO\u30d4\u30f3\u306b\u6d41\u3057\u3066\u826f\u3044\u96fb\u6d41\u306f\u3001\u5408\u8a08\u3067\u6700\u5927\u300c50mA\u300d<\/p>\n\n\n\n<p>GPIO1\u672c\u3042\u305f\u308a\u306e\u4e0a\u9650\u306f\u300c16mA\u300d<\/p>\n\n\n\n<p class=\"sp2\">\u3068\u3044\u3046\u3053\u3068\u3067\u30011k\u03a9\u306e\u62b5\u6297\u3092\u304b\u307e\u3057\u3066\u300c5mA\u300d\u306e\u96fb\u6d41\u3092\u6d41\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<p>5V \u00f7 1000\u03a9 = 0.005A = 5mA&nbsp;<\/p>\n\n\n\n<\/div><h2>\u30d7\u30ed\u30b0\u30e9\u30e0\uff08Python\uff09<\/h2><div class=\"inner\">\n\n\n\n<pre><code>import pigpio\nimport subprocess\nimport time\n\n# Power Off (Switch)\nservo = pigpio.pi()\nsw_pin = 16\nservo.set_mode(sw_pin, pigpio.INPUT)\nservo.set_pull_up_down(sw_pin, pigpio.PUD_DOWN)\n\ndef power_off(gpio, level, tick):\n        print(gpio, level, tick)\n        if level == 1:\n                subprocess.call(\"sudo poweroff\", shell=True)\n\nservo.callback(sw_pin, pigpio.EITHER_EDGE, power_off)\n\nwhile(True):\n        time.sleep(1)<\/code><\/pre>\n\n\n\n<p>GPIO16\u30d4\u30f3\u306b\u5165\u529b\u4fe1\u53f7\u304c\u3042\u3063\u305f\u5834\u5408\u3001callback\u95a2\u6570\uff08\u5272\u308a\u8fbc\u307f\uff09\u306b\u3088\u308a\u3001\u30e9\u30ba\u30d1\u30a4\u306b\u30b7\u30e3\u30c3\u30c8\u30c0\u30a6\u30f3\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3053\u308c\u304b\u3089\u7d39\u4ecb\u3059\u308b\u65b9\u6cd5\u304c\u3001\u304a\u305d\u3089\u304f\u6700\u3082\u30b7\u30f3\u30d7\u30eb\u306b\u300c\u30c8\u30b0\u30eb\u30b9\u30a4\u30c3\u30c1\u3067\u30e9\u30ba\u30d1\u30a4ZERO\u306e\u96fb\u6e90\u3092\u30aa\u30d5\u3067\u304d\u308b\u65b9\u6cd5\u300d\u3060\u3068\u601d\u3044\u307e\u3059\u3002 \u56de\u8def\u56f3 \u30b9\u30a4\u30c3\u30c1\u3092\u5207\u308a\u66ff\u3048\u308b\u3068\u3001\u30e9\u30ba\u30d1\u30a4\u306eGPIO16\u30d4\u30f3\u306b\u3001\u96fb\u6e90\u304b\u3089\u96fb\u6d41\u3092\u6d41\u3057\u307e\u3059\u3002 \u305f\u3060\u3057\u3001\u30e9\u30ba [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":1182,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[16],"tags":[55],"_links":{"self":[{"href":"https:\/\/www.ekit-tech.com\/index.php?rest_route=\/wp\/v2\/posts\/1179"}],"collection":[{"href":"https:\/\/www.ekit-tech.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ekit-tech.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ekit-tech.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ekit-tech.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1179"}],"version-history":[{"count":9,"href":"https:\/\/www.ekit-tech.com\/index.php?rest_route=\/wp\/v2\/posts\/1179\/revisions"}],"predecessor-version":[{"id":1255,"href":"https:\/\/www.ekit-tech.com\/index.php?rest_route=\/wp\/v2\/posts\/1179\/revisions\/1255"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.ekit-tech.com\/index.php?rest_route=\/wp\/v2\/media\/1182"}],"wp:attachment":[{"href":"https:\/\/www.ekit-tech.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1179"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ekit-tech.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1179"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ekit-tech.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1179"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}