{"id":354,"date":"2021-06-28T16:27:02","date_gmt":"2021-06-28T07:27:02","guid":{"rendered":"https:\/\/sumomo.ohwaki.jp\/wordpress\/?p=354"},"modified":"2021-06-28T16:27:02","modified_gmt":"2021-06-28T07:27:02","slug":"%e3%83%a9%e3%82%ba%e3%83%91%e3%82%a4-net-5%e3%81%a7iot%e3%82%82%e3%81%a9%e3%81%8d","status":"publish","type":"post","link":"https:\/\/sumomo.ohwaki.jp\/wordpress\/?p=354","title":{"rendered":"\u30e9\u30ba\u30d1\u30a4+.net 5\u3067IOT\u3082\u3069\u304d"},"content":{"rendered":"\n<p>\u3064\u3044\u306b\u3001\u30e9\u30ba\u30d1\u30a4\u306b\u624b\u3092\u51fa\u3057\u3066\u3057\u307e\u3063\u305f\u30fb\u30fb\u30fb<\/p>\n\n\n\n<p>\u3061\u3087\u3063\u3068\u3001\u30de\u30b7\u30f3\u30eb\u30fc\u30e0\u306e\u6e29\u5ea6\u8a08\u6e2c\u3084\u30e1\u30fc\u30eb\u306b\u3088\u308b\u30a2\u30e9\u30fc\u30c8\u6a5f\u80fd\u3092\u4ed8\u3051\u305f\u304f\u3066\u3001\u3068\u308a\u3042\u3048\u305a\u3001\u30e9\u30ba\u30d1\u30a4(3B+)\u3068\u5165\u9580\u30ad\u30c3\u30c8\u3092\u8cfc\u5165\u3002<\/p>\n\n\n\n<p>\u96fb\u5b50\u56de\u8def\u306a\u3093\u3066\u3001\u9ad8\u6821\u306e\u6642\u306b\u30a4\u30b8\u3063\u3066\u4ee5\u6765\u3060\u304b\u3089\u3001\u5168\u7136\u5206\u304b\u3089\u306a\u3044\u3051\u3069\u3001\u3068\u308a\u3042\u3048\u305a\u3001\u5165\u9580\u66f8\u3068\u304b\u8aad\u307f\u306a\u304c\u3089\u3001\u7c21\u5358\u306a\u56de\u8def\u3092\u4f5c\u3063\u3066\u304a\u8a66\u3057\u4e2d\u3002<\/p>\n\n\n\n<p>\u5165\u9580\u30ad\u30c3\u30c8\u306e\u30b5\u30f3\u30d7\u30eb\u306f\u3001C\u3084Python\u306a\u3093\u304b\u3067\u66f8\u304b\u308c\u3066\u3044\u308b\u3051\u3069\u3001\u3084\u306f\u308a\u3001\u3053\u3053\u306fC#\u3067\u66f8\u304d\u305f\u3044\u3088\u306d\u3002<\/p>\n\n\n\n<p>\u3067\u3001\u30e9\u30ba\u30d1\u30a4\u306b.net 5\u3092\u5c0e\u5165\u3002\u30e9\u30ba\u30d1\u30a43B+\u306fARM64\u306a\u3093\u3060\u3051\u3069\u3001\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u5165\u3063\u3066\u3044\u308b\u3001OS\u306f32bit(\u30e1\u30e2\u30ea1G\u3060\u304b\u3089\u307e\u3041\u59a5\u5f53\u3060\u308d\u3046)\u306eDebian\u30d9\u30fc\u30b9\u306eOS\u3060\u304c\u3001\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u306fapt list\u3067\u8abf\u3079\u308b\u3082\u3001dotnet-sdk\u306f\u898b\u3064\u304b\u3089\u306a\u3044\u3002\u4f55\u304b\u3057\u3089\u306e\u65b9\u6cd5\u306f\u3042\u308b\u306e\u3060\u308d\u3046\u304c\u3001\u30d1\u30c3\u30b1\u30fc\u30b8\u30de\u30cd\u30fc\u30b8\u30e3\u30fc\u304b\u3089\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u306e\u306f\u8ae6\u3081\u3066\u3001.net 5\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u30b5\u30a4\u30c8\u304b\u3089\u306earm32\u7248\u306etar.gz\u3092\u843d\u3068\u3057\u3066\u304d\u3066\u3001\u5c55\u958b\u3002(\u3069\u3046\u305b\u3001\u8907\u6570\u4eba\u6570\u3067\u4f7f\u3046\u308f\u3051\u3058\u3083\u306a\u3044\u304b\u3089\u554f\u984c\u7121\u3057)<\/p>\n\n\n\n<p>\u3067\u3001\u7c21\u5358\u306a\u56de\u8def\u3092\u4f5c\u6210\u3057\u3066\u307f\u308b\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"327\" src=\"https:\/\/sumomo.ohwaki.jp\/wordpress\/wp-content\/uploads\/2021\/06\/8ac96899b0db1d3d740ea11750f2aeba.png\" alt=\"\u56de\u8def\" class=\"wp-image-356\" srcset=\"https:\/\/sumomo.ohwaki.jp\/wordpress\/wp-content\/uploads\/2021\/06\/8ac96899b0db1d3d740ea11750f2aeba.png 800w, https:\/\/sumomo.ohwaki.jp\/wordpress\/wp-content\/uploads\/2021\/06\/8ac96899b0db1d3d740ea11750f2aeba-300x123.png 300w, https:\/\/sumomo.ohwaki.jp\/wordpress\/wp-content\/uploads\/2021\/06\/8ac96899b0db1d3d740ea11750f2aeba-768x314.png 768w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><\/figure>\n\n\n\n<p>\u3068\u308a\u3042\u3048\u305a\u3001\u8d64\u67a0\u3067\u56f2\u3093\u3060\u90e8\u5206\u304c\u6700\u521d\u306b\u4f5c\u3063\u305f\u56de\u8def\u3002\u7c21\u5358\u306b\u66f8\u304f\u3068\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u56de\u8def\u306b\u306a\u3063\u3066\u3044\u308b\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"941\" height=\"131\" src=\"https:\/\/sumomo.ohwaki.jp\/wordpress\/wp-content\/uploads\/2021\/06\/d3c3ba3bff369efa8e081b5a5251af6c-1.png\" alt=\"\" class=\"wp-image-359\" srcset=\"https:\/\/sumomo.ohwaki.jp\/wordpress\/wp-content\/uploads\/2021\/06\/d3c3ba3bff369efa8e081b5a5251af6c-1.png 941w, https:\/\/sumomo.ohwaki.jp\/wordpress\/wp-content\/uploads\/2021\/06\/d3c3ba3bff369efa8e081b5a5251af6c-1-300x42.png 300w, https:\/\/sumomo.ohwaki.jp\/wordpress\/wp-content\/uploads\/2021\/06\/d3c3ba3bff369efa8e081b5a5251af6c-1-768x107.png 768w\" sizes=\"auto, (max-width: 941px) 100vw, 941px\" \/><\/figure>\n\n\n\n<p>\u9752\u3044\u30b1\u30fc\u30d6\u30eb\u304c+3.3V\u306b\u523a\u3055\u3063\u3066\u3044\u3066\u3001\u8d64\u3044\u30b1\u30fc\u30d6\u30eb\u306f\u30e9\u30ba\u30d1\u30a4\u4e0a\u306eGPIO<em>0<\/em>\u306b\u523a\u3055\u3063\u3066\u3044\u308b\u3002GPIO<em>0<\/em>\u306e\u5f8c\u306e()\u306b17\u3068\u66f8\u304b\u308c\u3066\u3044\u308b\u306e\u306fBCM\u3068\u547c\u3070\u308c\u308b\u756a\u53f7\u3067\u3001Microsoft\u88fd\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u306f\u3053\u3061\u3089\u306e\u756a\u53f7\u3092\u6307\u5b9a\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u3002\u4ee5\u4e0b\u306fgpio\u30b3\u30de\u30f3\u30c9\u306e\u51fa\u529b\u3067\u3001\u3044\u304f\u3064\u304b\u306e\u540d\u524d\u3084\u30d4\u30f3\u756a\u53f7\u304c\u8868\u793a\u3055\u308c\u3066\u3044\u308b\u3002\u30e9\u30a4\u30d6\u30e9\u30ea\u306b\u3088\u3063\u3066\u3001\u4f7f\u7528\u3059\u308b\u30d4\u30f3\u756a\u53f7\u304c\u9055\u3046\u306e\u3067\u3001\u6ce8\u610f\u3055\u308c\u305f\u3044\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/sumomo.ohwaki.jp\/wordpress\/wp-content\/uploads\/2021\/06\/9bf7019343a3692041435c163e1132bc-1024x691.png\" alt=\"\u30e9\u30ba\u30d1\u30a4GPIO\" class=\"wp-image-357\" width=\"670\" height=\"452\" srcset=\"https:\/\/sumomo.ohwaki.jp\/wordpress\/wp-content\/uploads\/2021\/06\/9bf7019343a3692041435c163e1132bc-1024x691.png 1024w, https:\/\/sumomo.ohwaki.jp\/wordpress\/wp-content\/uploads\/2021\/06\/9bf7019343a3692041435c163e1132bc-300x202.png 300w, https:\/\/sumomo.ohwaki.jp\/wordpress\/wp-content\/uploads\/2021\/06\/9bf7019343a3692041435c163e1132bc-768x518.png 768w, https:\/\/sumomo.ohwaki.jp\/wordpress\/wp-content\/uploads\/2021\/06\/9bf7019343a3692041435c163e1132bc.png 1038w\" sizes=\"auto, (max-width: 670px) 100vw, 670px\" \/><\/figure>\n\n\n\n<p>\u306a\u3093\u3067\u8907\u6570\u306e\u547c\u3073\u65b9\u304c\u3042\u308b\u306e\u304b\u3068\u304b\u8a00\u3046\u306e\u306f\u3001\u30e9\u30ba\u30d1\u30a4\u5165\u9580\u7de8\u306e\u30b5\u30a4\u30c8\u3068\u304b\u306b\u5fc5\u305a\u66f8\u3044\u3066\u3042\u308b\u306e\u3067\u3001\u305d\u3061\u3089\u3092\u53c2\u7167\u3057\u3066\u6b32\u3057\u3044\u3002<\/p>\n\n\n\n<p>\u3067\u3001\u4eca\u56de\u3053\u306e\u56de\u8def\u3067\u3084\u308a\u305f\u3044\u306e\u306f\u3001LED\u306e\u70b9\u706f\u30fb\u6d88\u706f\u3067\u3042\u308b\u3002\u56de\u8def\u3092\u898b\u308b\u3068\u3001GPIO<em>0<\/em>\uff08BCM\u30d4\u30f3\u756a\u53f717)\u304c\u90aa\u9b54\u3092\u3059\u308b\u5f62\u306b\u306a\u3063\u3066\u3044\u308b\u306e\u3067\u3001LED\u3092\u70b9\u706f\u3055\u305b\u305f\u3051\u308c\u3070\u3001GPIO<em>0<\/em>(BCM\u30d4\u30f3\u756a\u53f717)\u306e\u96fb\u4f4d\u3092\u843d\u3068\u3059\u5fc5\u8981\u304c\u3042\u308b\u3002\u9006\u306b\u6d88\u706f\u3055\u305b\u305f\u3044\u5834\u5408\u306f\u96fb\u4f4d\u3092\u4e0a\u3052\u308c\u3070\u826f\u3044\u3002<\/p>\n\n\n\n<p>\u3068\u3044\u3046\u3053\u3068\u3067\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u30b3\u30fc\u30c9\u3067\u30d7\u30ed\u30b0\u30e9\u30e0\u304b\u3089LED\u306e\u30aa\u30f3\u30fb\u30aa\u30d5\u304c\u5b9f\u73fe\u3067\u304d\u308b\u3002<br>(\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306b\u2193\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u8ffd\u52a0\u304c\u5fc5\u8981)<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>System.Device.Gpio<\/li><li>Iot.Device.Bindings<\/li><\/ul>\n\n\n\n<p>\u30d7\u30ed\u30b0\u30e9\u30e0\u306f\u5358\u7d14\u306bConsole\u30a2\u30d7\u30ea\u3067\u4f5c\u3063\u3066\u307f\u305f\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism undefined-numbers lang-csharp\" data-file=\"LED\u70b9\u6ec5\" data-lang=\"C#\"><code>using System;\nusing System.Threading;\n\/\/ GPIO\u30e9\u30a4\u30d6\u30e9\u30ea\nusing System.Device.Gpio;\n\nnamespace oneLedCtrl\n{\n    class Program\n    {\n        static void Main(string[] args)\n        {\n            const int pinno = 17;   \/\/ BCM Pin No\n            \/\/ GPIO\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u4f5c\u6210\n            var ctrl = new GpioController();\n            \/\/ Pin\u306e\u30aa\u30fc\u30d7\u30f3(\u66f8\u304d\u8fbc\u307f\u30e2\u30fc\u30c9)\n            ctrl.OpenPin(pinno,PinMode.Output);\n            PinValue val = PinValue.High;\n            \/\/ 1\u79d2\u3054\u3068\u306b\u70b9\u6ec5\u3092\u7e70\u308a\u8fd4\u3059\n            for(;!Console.KeyAvailable;) {\n                if (val == PinValue.High) {\n                    val = PinValue.Low; \/\/ \u70b9\u706f\n                } else {\n                    val = PinValue.High; \/\/ \u6d88\u706f\n                }\n                \/\/ GPIO0(BCM 17)\u306b\u66f8\u304d\u8fbc\u307f\n                ctrl.Write(pinno,val);\n                Thread.Sleep(1000);\n            }\n            ctrl.ClosePin(pinno);\n        }\n    }\n}\n<\/code><\/pre><\/div>\n\n\n\n<p>\u3053\u308c\u304f\u3089\u3044\u306e\u56de\u8def\u306a\u3089\u3001\u7c21\u5358\u3060\u304b\u3089\u3044\u3044\u3093\u3060\u3051\u3069\u3001\u8907\u96d1\u306a\u306e\u306f\u914d\u7dda\u3082\u9762\u5012\u3060\u3088\u306d\u3002<br>\u696d\u52d9\u3067\u4f7f\u3046\u306e\u306a\u3089\u3001\u3084\u3063\u3071\u308a\u3001\u56de\u8def\u304c\u7d44\u3093\u3067\u3042\u308b\u88fd\u54c1\u3092\u8cfc\u5165\u3059\u3079\u304d\u306a\u3093\u3060\u308d\u3046\u306d\u3002<\/p>\n\n\n\n<p>\u307e\u3041\u3001\u3068\u308a\u3042\u3048\u305a\u306f\u3001\u5165\u9580\u30ad\u30c3\u30c8\u3067\u8272\u3005\u3068\u904a\u3093\u3067\u307f\u308b\u3064\u3082\u308a\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3064\u3044\u306b\u3001\u30e9\u30ba\u30d1\u30a4\u306b\u624b\u3092\u51fa\u3057\u3066\u3057\u307e\u3063\u305f\u30fb\u30fb\u30fb \u3061\u3087\u3063\u3068\u3001\u30de\u30b7\u30f3\u30eb\u30fc\u30e0\u306e\u6e29\u5ea6\u8a08\u6e2c\u3084\u30e1 &hellip; <a href=\"https:\/\/sumomo.ohwaki.jp\/wordpress\/?p=354\">\u7d9a\u304d\u3092\u8aad\u3080 <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9,19,20,4],"tags":[],"class_list":["post-354","post","type-post","status-publish","format-standard","hentry","category-c","category-iot","category-raspberry-pi","category-4"],"_links":{"self":[{"href":"https:\/\/sumomo.ohwaki.jp\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/354","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sumomo.ohwaki.jp\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sumomo.ohwaki.jp\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sumomo.ohwaki.jp\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sumomo.ohwaki.jp\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=354"}],"version-history":[{"count":4,"href":"https:\/\/sumomo.ohwaki.jp\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/354\/revisions"}],"predecessor-version":[{"id":362,"href":"https:\/\/sumomo.ohwaki.jp\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/354\/revisions\/362"}],"wp:attachment":[{"href":"https:\/\/sumomo.ohwaki.jp\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=354"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sumomo.ohwaki.jp\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=354"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sumomo.ohwaki.jp\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=354"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}