{"id":451,"date":"2015-08-22T15:20:49","date_gmt":"2015-08-22T06:20:49","guid":{"rendered":"http:\/\/arduino.mx55.com\/?page_id=451"},"modified":"2015-08-22T18:09:29","modified_gmt":"2015-08-22T09:09:29","slug":"4%e5%80%8b%e3%81%ae%e3%82%b9%e3%82%a4%e3%83%83%e3%83%81%e3%81%ae%e7%8a%b6%e6%85%8b%e3%81%ab%e5%90%88%e3%82%8f%e3%81%9b%e3%81%a64%e5%80%8b%e3%81%ae%ef%bd%8c%ef%bd%85%ef%bd%84%e3%81%8c%e7%82%b9%e7%81%af","status":"publish","type":"page","link":"https:\/\/arduino.mx55.com\/?page_id=451","title":{"rendered":"4\u500b\u306e\u30b9\u30a4\u30c3\u30c1\u306e\u72b6\u614b\u306b\u5408\u308f\u305b\u30664\u500b\u306e\uff2c\uff25\uff24\u304c\u70b9\u706f\u3059\u308b"},"content":{"rendered":"<p><span style=\"color: #ff0000;\"><strong>\u3010Ver.1\u975e\u5bfe\u5fdc\u3011<\/strong><br \/>\nVer.2\u3068Arduino\u57fa\u790e\u5b66\u7fd2\u30b7\u30fc\u30eb\u30c9\u3067\u5229\u7528\u53ef\u80fd\u3067\u3059<\/span><\/p>\n<p>\uff14\u500b\u306e\uff2c\uff25\uff24\uff08\uff2c\uff11\uff0c\uff2c\uff12\uff0c\uff2c\uff13\uff0c\uff2c\uff14\uff09\u3092\u30b9\u30a4\u30c3\u30c1\uff08\uff33\uff13\uff0c\uff33\uff14\uff0c\uff33\uff15\uff0c\uff33\uff16\uff09\u306e\u72b6\u614b\u306b\u5408\u308f\u305b\u3066\u70b9\u6ec5\u3055\u305b\u308b\u30d7\u30ed\u30b0\u30e9\u30e0\u3067\u3059\u3002HIGH\u306b\u306a\u3063\u3066\u3044\u308b\u3068\u3053\u308d\u3060\u3051\u304c\u70b9\u706f\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: cpp; title: ; notranslate\" title=\"\">\r\n\/\/\u3000\uff14\u500b\u306e\uff2c\uff25\uff24\uff08\uff2c\uff11\uff0c\uff2c\uff12\uff0c\uff2c\uff13\uff0c\uff2c\uff14\uff09\u3092\r\n\/\/\u3000\u30b9\u30a4\u30c3\u30c1\uff08\uff33\uff13\uff0c\uff33\uff14\uff0c\uff33\uff15\uff0c\uff33\uff16\uff09\u306e\u72b6\u614b\u306b\u5408\u308f\u305b\u3066\r\n\/\/\u3000\u70b9\u6ec5\u3055\u305b\u308b\u30d7\u30ed\u30b0\u30e9\u30e0\r\n\/\/\u3000HIGH\u306b\u306a\u3063\u3066\u3044\u308b\u3068\u3053\u308d\u3060\u3051\u304c\u70b9\u706f\u3057\u307e\u3059\r\n\r\n#define L1 10\r\n#define L2 11\r\n#define L3 12\r\n#define L4 13\r\n\r\n#define S3 19\r\n#define S4 18\r\n#define S5 17\r\n#define S6 16\r\n\r\nint i;                            \/\/ \u5909\u6570i\u3092\u6574\u6570\u578b\u3067\u5ba3\u8a00\r\n \r\nvoid setup() {\r\n  \r\n  for(i=10;i&lt;=13;i++){            \/\/  i\u3092\u5909\u3048\u30664\u56de\u7e70\u308a\u8fd4\u3057\r\n  pinMode(i, OUTPUT);             \/\/\u30dd\u30fc\u30c8\u306e\u8a2d\u5b9a\uff08\u5165\u529b\u304b\u51fa\u529b\u304b\uff1f\uff09\r\n  }                               \/\/D10,D11,D12,D13\u3092\u51fa\u529b\u306b\u8a2d\u5b9a\r\n  \r\n  for(i=16;i&lt;=19;i++){            \/\/  i\u3092\u5909\u3048\u30664\u56de\u7e70\u308a\u8fd4\u3057\r\n  pinMode(i, INPUT);              \/\/\u30dd\u30fc\u30c8\u306e\u8a2d\u5b9a\uff08\u5165\u529b\u304b\u51fa\u529b\u304b\uff1f\uff09\r\n  }                               \/\/D16,D17,D18,D19\u3092\u5165\u529b\u306b\u8a2d\u5b9a\r\n  \r\n}\r\n \r\nvoid loop() {\r\n  \r\n  if(digitalRead(S3)==HIGH){ digitalWrite(L1, HIGH);}          \/\/ \uff2c\uff11\u3092\u70b9\u706f\r\n  else{digitalWrite(L1, LOW);}\r\n  \r\n  if(digitalRead(S4)==HIGH){ digitalWrite(L2, HIGH);}          \/\/ \uff2c\uff12\u3092\u70b9\u706f\r\n  else{digitalWrite(L2, LOW);}\r\n  \r\n  if(digitalRead(S5)==HIGH){ digitalWrite(L3, HIGH);}          \/\/ \uff2c\uff13\u3092\u70b9\u706f\r\n  else{digitalWrite(L3, LOW);}\r\n  \r\n  if(digitalRead(S6)==HIGH){ digitalWrite(L4, HIGH);}          \/\/ \uff2c\uff14\u3092\u70b9\u706f\r\n  else{digitalWrite(L4, LOW);}\r\n  \r\n}\r\n\/\/\u3053\u3053\u307e\u3067\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u3010Ver.1\u975e\u5bfe\u5fdc\u3011 Ver.2\u3068Arduino\u57fa\u790e\u5b66\u7fd2\u30b7\u30fc\u30eb\u30c9\u3067\u5229\u7528\u53ef\u80fd\u3067\u3059 \uff14\u500b\u306e\uff2c\uff25\uff24\uff08\uff2c\uff11\uff0c\uff2c\uff12\uff0c\uff2c\uff13\uff0c\uff2c\uff14\uff09\u3092\u30b9\u30a4\u30c3\u30c1\uff08\uff33\uff13\uff0c\uff33\uff14\uff0c\uff33\uff15\uff0c\uff33\uff16\uff09\u306e\u72b6\u614b\u306b\u5408\u308f\u305b\u3066\u70b9\u6ec5\u3055\u305b\u308b\u30d7\u30ed\u30b0\u30e9\u30e0\u3067\u3059\u3002HIGH\u306b\u306a\u3063\u3066\u3044\u308b\u3068\u3053 <a class=\"more-link\" href=\"https:\/\/arduino.mx55.com\/?page_id=451\">\u7d9a\u304d\u3092\u8aad\u3080 <span class=\"screen-reader-text\">  4\u500b\u306e\u30b9\u30a4\u30c3\u30c1\u306e\u72b6\u614b\u306b\u5408\u308f\u305b\u30664\u500b\u306e\uff2c\uff25\uff24\u304c\u70b9\u706f\u3059\u308b<\/span><span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":16,"menu_order":90,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"class_list":["post-451","page","type-page","status-publish","hentry"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/arduino.mx55.com\/index.php?rest_route=\/wp\/v2\/pages\/451","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/arduino.mx55.com\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/arduino.mx55.com\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/arduino.mx55.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/arduino.mx55.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=451"}],"version-history":[{"count":3,"href":"https:\/\/arduino.mx55.com\/index.php?rest_route=\/wp\/v2\/pages\/451\/revisions"}],"predecessor-version":[{"id":460,"href":"https:\/\/arduino.mx55.com\/index.php?rest_route=\/wp\/v2\/pages\/451\/revisions\/460"}],"up":[{"embeddable":true,"href":"https:\/\/arduino.mx55.com\/index.php?rest_route=\/wp\/v2\/pages\/16"}],"wp:attachment":[{"href":"https:\/\/arduino.mx55.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=451"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}