{"id":1502,"date":"2020-06-09T15:25:37","date_gmt":"2020-06-09T06:25:37","guid":{"rendered":"https:\/\/www.rocher.kyoto.jp\/arbr\/?p=1502"},"modified":"2020-06-09T15:25:37","modified_gmt":"2020-06-09T06:25:37","slug":"raspberry-pi%e3%81%aegpio%e5%88%9d%e6%9c%9f%e5%80%a4","status":"publish","type":"post","link":"https:\/\/www.rocher.kyoto.jp\/arbr\/?p=1502","title":{"rendered":"Raspberry PI\u306eGPIO\u521d\u671f\u5024"},"content":{"rendered":"\n<p>\u3044\u307e\u4f5c\u3063\u3066\u3044\u308b\u6bba\u83cc\u30ed\u30dc\u30c3\u30c8\u304c\u30e9\u30ba\u30d1\u30a4\u306e\u96fb\u6e90\u3092\u5165\u308c\u308b\u3068\u30e2\u30fc\u30bf\u30fc\u304c\u52d5\u304d\u51fa\u3057\u3066\u3044\u305f\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.rocher.kyoto.jp\/arbr\/wp-content\/uploads\/2020\/06\/DSC_0129.jpg\" alt=\"\" class=\"wp-image-1503\" width=\"329\" height=\"585\" srcset=\"https:\/\/www.rocher.kyoto.jp\/arbr\/wp-content\/uploads\/2020\/06\/DSC_0129.jpg 360w, https:\/\/www.rocher.kyoto.jp\/arbr\/wp-content\/uploads\/2020\/06\/DSC_0129-169x300.jpg 169w\" sizes=\"auto, (max-width: 329px) 100vw, 329px\" \/><\/figure>\n\n\n\n<p>\u4f7f\u3063\u3066\u3044\u308bB+\u3060\u3068BCM\u306717&amp;27,22&amp;6\u306b\u30e2\u30fc\u30bf\u30fc\u30c9\u30e9\u30a4\u30d0\u30fc2\u3064\u306eFIN\/RIN\u3092\u305d\u308c\u305e\u308c\u3064\u306a\u3052\u3066\u3044\u305f\u306e\u3060\u3051\u3069\u3001GPIO6\u3060\u3051\u521d\u671f\u5024\u304c1(IN)\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>pi@raspberrypi:~$ gpio readall\n +-----+-----+---------+------+---+---Pi B+--+---+------+---------+-----+-----+\n | BCM | wPi |   Name  | Mode | V | Physical | V | Mode | Name    | wPi | BCM |\n +-----+-----+---------+------+---+----++----+---+------+---------+-----+-----+\n |     |     |    3.3v |      |   |  1 || 2  |   |      | 5v      |     |     |\n |   2 |   8 |   SDA.1 |   IN | 1 |  3 || 4  |   |      | 5v      |     |     |\n |   3 |   9 |   SCL.1 |   IN | 1 |  5 || 6  |   |      | 0v      |     |     |\n |   4 |   7 | GPIO. 7 |   IN | 1 |  7 || 8  | 1 | ALT0 | TxD     | 15  | 14  |\n |     |     |      0v |      |   |  9 || 10 | 1 | ALT0 | RxD     | 16  | 15  |\n |  17 |   0 | GPIO. 0 |   IN | 0 | 11 || 12 | 0 | IN   | GPIO. 1 | 1   | 18  |\n |  27 |   2 | GPIO. 2 |   IN | 0 | 13 || 14 |   |      | 0v      |     |     |\n |  22 |   3 | GPIO. 3 |   IN | 0 | 15 || 16 | 0 | IN   | GPIO. 4 | 4   | 23  |\n |     |     |    3.3v |      |   | 17 || 18 | 0 | IN   | GPIO. 5 | 5   | 24  |\n |  10 |  12 |    MOSI |   IN | 0 | 19 || 20 |   |      | 0v      |     |     |\n |   9 |  13 |    MISO |   IN | 0 | 21 || 22 | 0 | IN   | GPIO. 6 | 6   | 25  |\n |  11 |  14 |    SCLK |   IN | 0 | 23 || 24 | 1 | IN   | CE0     | 10  | 8   |\n |     |     |      0v |      |   | 25 || 26 | 1 | IN   | CE1     | 11  | 7   |\n |   0 |  30 |   SDA.0 |   IN | 1 | 27 || 28 | 1 | IN   | SCL.0   | 31  | 1   |\n |   5 |  21 | GPIO.21 |   IN | 1 | 29 || 30 |   |      | 0v      |     |     |\n |   6 |  22 | GPIO.22 |   IN | 1 | 31 || 32 | 0 | IN   | GPIO.26 | 26  | 12  |\n |  13 |  23 | GPIO.23 |   IN | 0 | 33 || 34 |   |      | 0v      |     |     |\n |  19 |  24 | GPIO.24 |   IN | 0 | 35 || 36 | 0 | IN   | GPIO.27 | 27  | 16  |\n |  26 |  25 | GPIO.25 |   IN | 0 | 37 || 38 | 0 | IN   | GPIO.28 | 28  | 20  |\n |     |     |      0v |      |   | 39 || 40 | 0 | IN   | GPIO.29 | 29  | 21  |\n +-----+-----+---------+------+---+----++----+---+------+---------+-----+-----+\n | BCM | wPi |   Name  | Mode | V | Physical | V | Mode | Name    | wPi | BCM |\n +-----+-----+---------+------+---+---Pi B+--+---+------+---------+-----+-----+\n<\/code><\/pre>\n\n\n\n<p>XOR\u304c1\u306e\u6642\u306b\u52d5\u4f5c\u3092\u3059\u308b\u306e\u3067GPIO22&amp;GPIO6\u304c1\u3067\u52d5\u4f5c\u3057\u3066\u3044\u305f\u3002GPIO\u306e\u521d\u671f\u5024\u306f\uff08\u8d77\u52d5\u6642\u306b\u30bd\u30d5\u30c8\u7684\u306b\u66f8\u304d\u63db\u3048\u3089\u308c\u308b\u3051\u3069\uff09\u30cf\u30fc\u30c9\u7684\u306b\u6c7a\u307e\u3063\u3066\u3044\u308b\u3082\u3088\u3046\u3002\u30c8\u30e9\u30d6\u30eb\u3067\u96fb\u6e90\u5165\u308c\u305f\u3089\u52d5\u304d\u51fa\u3059\u3068\u6c17\u6301\u3061\u60aa\u3044\u306e\u3067\u521d\u671f\u50240\u306eGPIO\u306b\u3064\u306a\u3052\u308b\u3053\u3068\u306b\u3059\u308b\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3044\u307e\u4f5c\u3063\u3066\u3044\u308b\u6bba\u83cc\u30ed\u30dc\u30c3\u30c8\u304c\u30e9\u30ba\u30d1\u30a4\u306e\u96fb\u6e90\u3092\u5165\u308c\u308b\u3068\u30e2\u30fc\u30bf\u30fc\u304c\u52d5\u304d\u51fa\u3057\u3066\u3044\u305f\u3002 \u4f7f\u3063\u3066\u3044\u308bB+\u3060\u3068BCM\u306717&amp;27,22&amp;6\u306b\u30e2\u30fc\u30bf\u30fc\u30c9\u30e9\u30a4\u30d0\u30fc2\u3064\u306eFIN\/RIN\u3092\u305d\u308c\u305e\u308c\u3064\u306a\u3052\u3066\u3044\u305f\u306e\u3060\u3051\u3069\u3001GPI [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[100],"tags":[],"class_list":["post-1502","post","type-post","status-publish","format-standard","hentry","category-raspberrypi"],"_links":{"self":[{"href":"https:\/\/www.rocher.kyoto.jp\/arbr\/index.php?rest_route=\/wp\/v2\/posts\/1502","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rocher.kyoto.jp\/arbr\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rocher.kyoto.jp\/arbr\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rocher.kyoto.jp\/arbr\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rocher.kyoto.jp\/arbr\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1502"}],"version-history":[{"count":1,"href":"https:\/\/www.rocher.kyoto.jp\/arbr\/index.php?rest_route=\/wp\/v2\/posts\/1502\/revisions"}],"predecessor-version":[{"id":1504,"href":"https:\/\/www.rocher.kyoto.jp\/arbr\/index.php?rest_route=\/wp\/v2\/posts\/1502\/revisions\/1504"}],"wp:attachment":[{"href":"https:\/\/www.rocher.kyoto.jp\/arbr\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1502"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rocher.kyoto.jp\/arbr\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1502"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rocher.kyoto.jp\/arbr\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1502"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}