{"id":4500,"date":"2014-12-05T10:40:41","date_gmt":"2014-12-05T01:40:41","guid":{"rendered":"http:\/\/stocker.jp\/diary\/?p=4500"},"modified":"2014-12-04T20:50:39","modified_gmt":"2014-12-04T11:50:39","slug":"shining-advent-calendar-2014","status":"publish","type":"post","link":"https:\/\/stocker.jp\/diary\/shining-advent-calendar-2014\/","title":{"rendered":"Web\u306e\u95c7\u3092\u5149\u3067\u7167\u3089\u3059\uff08\u7269\u7406\uff09"},"content":{"rendered":"<p><a href=\"http:\/\/www.adventar.org\/calendars\/371\" target=\"_blank\">\u5149 Advent Calendar 2014<\/a> 5\u65e5\u76ee\u306e\u8a18\u4e8b\u3067\u3059\u3002<\/p>\n<p>\u3068\u3042\u308bWeb\u5236\u4f5c\u8005\u306e\u65b9\u304c\u300cNexus 7 \u306e\u5bfe\u5fdc\u306f\u95c7\u3060\u300d\u3068\u8a71\u3057\u3066\u3044\u305f\u306e\u3067\u3001\u5149\u3067\u7167\u3089\u3059\u3053\u3068\u306b\u3057\u307e\u3057\u305f\u3002<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/stocker.jp\/diary\/wp-content\/uploads\/shining-advent-calendar-1.jpg?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/stocker.jp\/diary\/wp-content\/uploads\/shining-advent-calendar-1.jpg?resize=500%2C333&#038;ssl=1\" alt=\"Nexus 7\u3092LED\u306e\u5149\u3067\u7167\u3089\u3059\" width=\"500\" height=\"333\" class=\"aligncenter size-large wp-image-4505\" srcset=\"https:\/\/i0.wp.com\/stocker.jp\/diary\/wp-content\/uploads\/shining-advent-calendar-1.jpg?resize=500%2C333&amp;ssl=1 500w, https:\/\/i0.wp.com\/stocker.jp\/diary\/wp-content\/uploads\/shining-advent-calendar-1.jpg?resize=300%2C200&amp;ssl=1 300w, https:\/\/i0.wp.com\/stocker.jp\/diary\/wp-content\/uploads\/shining-advent-calendar-1.jpg?w=1000&amp;ssl=1 1000w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/a><\/p>\n<p><span class=\"b\">\u203b\u3053\u308c\u306f\u30cd\u30bf\u8a18\u4e8b\u3067\u3059\u3002\u30c7\u30b6\u30a4\u30f3\u3084 Web \u306e\u6280\u8853\u3068\u306f 1px \u3082\u95a2\u4fc2\u3042\u308a\u307e\u305b\u3093\u3002<\/span><\/p>\n<h3><span class=\"ez-toc-section\" id=\"%E7%94%A8%E6%84%8F%E3%81%99%E3%82%8B%E3%82%82%E3%81%AE\"><\/span>\u7528\u610f\u3059\u308b\u3082\u306e<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<ul>\n<li>Nexus 7\uff08\u95c7\uff09<\/li>\n<li>\u767d\u8272LED\uff08\u5149\uff09<\/li>\n<li>PocketDuino\uff08Arduino Uno \u3067\u3082\u53ef\uff09<\/li>\n<\/ul>\n<p><a href=\"https:\/\/i0.wp.com\/stocker.jp\/diary\/wp-content\/uploads\/shining-advent-calendar-4.jpg?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/stocker.jp\/diary\/wp-content\/uploads\/shining-advent-calendar-4.jpg?resize=500%2C333&#038;ssl=1\" alt=\"PocketDuino\" width=\"500\" height=\"333\" class=\"aligncenter size-large wp-image-4512\" srcset=\"https:\/\/i0.wp.com\/stocker.jp\/diary\/wp-content\/uploads\/shining-advent-calendar-4.jpg?resize=500%2C333&amp;ssl=1 500w, https:\/\/i0.wp.com\/stocker.jp\/diary\/wp-content\/uploads\/shining-advent-calendar-4.jpg?resize=300%2C200&amp;ssl=1 300w, https:\/\/i0.wp.com\/stocker.jp\/diary\/wp-content\/uploads\/shining-advent-calendar-4.jpg?w=1000&amp;ssl=1 1000w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/a><\/p>\n<p><span class=\"b\">PocketDuino<\/span><\/p>\n<h3><span class=\"ez-toc-section\" id=\"Arduino_PocketDuino%E3%81%A8%E3%81%AF\"><\/span>Arduino \/ PocketDuino\u3068\u306f<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Arduino \u306f\u3001\u521d\u5fc3\u8005\u5411\u3051\u30de\u30a4\u30b3\u30f3\u30dc\u30fc\u30c9\u306e\u4e00\u7a2e\u3067\u3001C++\u8a00\u8a9e\u98a8\u306e\u300cArduino\u8a00\u8a9e\u300d\u307e\u305f\u306f\u300c\u30b9\u30b1\u30c3\u30c1\u300d\u3068\u3088\u3070\u308c\u308b\u30d7\u30ed\u30b0\u30e9\u30e0\u3092 PC \u3084 Mac \u304b\u3089 USB \u7d4c\u7531\u3067\u66f8\u304d\u8fbc\u307f\u3001\u5b9f\u884c\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3082\u306e\u3067\u3059\u3002<\/p>\n<p>\u53c2\u8003: <a href=\"http:\/\/ideahack.me\/what-is-arduino\/\" target=\"_blank\">\u6700\u8fd1\u8a71\u984c\u306e\u300eArduino\u300f\u3068\u306f\u4e00\u4f53\u4f55\u306a\u306e\uff1f\u4f55\u304c\u3067\u304d\u308b\u306e\uff1f\u307e\u3068\u3081 | IDEA HACK<\/a><\/p>\n<p>PocketDuino \u306f\u3001Arduino \u4e92\u63db\u6a5f\u306e\u4e00\u7a2e\u3067\u3059\u3002<br \/>\nAndroid \u4e0a\u3067\u300cArduino\u8a00\u8a9e\u300d\u3092\u66f8\u3044\u305f\u308a\u3001\u30d5\u30a1\u30fc\u30e0\u30a6\u30a7\u30a2\u3092\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3057\u305f\u308a\u3001\u30bb\u30f3\u30b5\u30fc\u306e\u5024\u3092\u53d7\u3051\u53d6\u3063\u3066 Android \u30a2\u30d7\u30ea\u306b\u6e21\u3057\u305f\u308a\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>PocketDuino \u306f\u3001\u307e\u3060\u5e02\u8ca9\u3055\u308c\u3066\u3044\u307e\u305b\u3093\u304c\u3001\u5148\u65e5\u306e <a href=\"http:\/\/makezine.jp\/event\/mft2014\/\" target=\"_blank\">Maker Faire Tokyo 2014<\/a> \u3067\u8ca9\u58f2\u3055\u308c\u3066\u3044\u305f\u3082\u306e\u3092\u8cfc\u5165\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>\u4eca\u56de\u306f\u3001Nexus 7\uff08\u95c7\uff09\u306e\u96fb\u529b\u3092\u4f7f\u3063\u3066\u3001\u767d\u8272LED\uff08\u5149\uff09\u3067\u7167\u3089\u3059\u3053\u3068\u306b\u3057\u307e\u3057\u305f\u3002<\/p>\n<h3><span class=\"ez-toc-section\" id=\"%E3%83%97%E3%83%AD%E3%82%B0%E3%83%A9%E3%83%A0\"><\/span>\u30d7\u30ed\u30b0\u30e9\u30e0<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>\u307e\u305a\u306f\u3001\u300cArduino\u8a00\u8a9e\u300d\u307e\u305f\u306f\u300c\u30b9\u30b1\u30c3\u30c1\u300d\u3068\u3088\u3070\u308c\u308b\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u66f8\u304d\u307e\u3059\u3002<br \/>\nArduino IDE \u3068\u3088\u3070\u308c\u308b\u958b\u767a\u74b0\u5883\u306b\u306f\u3001\u6700\u521d\u304b\u3089 LED \u3092\u70b9\u6ec5\u3055\u305b\u308b\u30d7\u30ed\u30b0\u30e9\u30e0\u304c\u6700\u521d\u304b\u3089\u5165\u3063\u3066\u3044\u307e\u3059\u306e\u3067\u3001\u305d\u3061\u3089\u3092\u5c11\u3057\u3060\u3051\u66f8\u304d\u63db\u3048\u3066\u4f7f\u3044\u307e\u3059\u3002<\/p>\n<pre lang=\"c\" line=\"1\">\r\n\/\/ LED connected to digital pin 2 \r\nconst int led = 2;\r\n\r\n\/\/ the setup routine runs once when you press reset:\r\nvoid setup() {\r\n  \/\/ initialize the digital pin as an output.\r\n  pinMode(led, OUTPUT);\r\n}\r\n\r\n\/\/ the loop routine runs over and over again forever:\r\nvoid loop() {\r\n  digitalWrite(led, HIGH);   \/\/ turn the LED on (HIGH is the voltage level)\r\n  delay(1000);               \/\/ wait for a second\r\n  digitalWrite(led, LOW);    \/\/ turn the LED off by making the voltage LOW\r\n  delay(1000);               \/\/ wait for a second\r\n}\r\n<\/pre>\n<p>2\u884c\u76ee\u3067\u3001\u5b9a\u6570 led \u306b\u30012 \u3092\u4ee3\u5165\u3057\u3066\u3044\u307e\u3059\u304c\u3001\u3053\u308c\u306f PocketDuino \u306e\u30c7\u30b8\u30bf\u30eb\u30d4\u30f3 2 \u306b LED \u3092\u63a5\u7d9a\u3059\u308b\u3068\u3044\u3046\u3053\u3068\u3067\u3059\u3002<br \/>\n\u5909\u6570\u3067\u3082\u69cb\u3044\u307e\u305b\u3093\u304c\u3001\u30d7\u30ed\u30b0\u30e9\u30e0\u306e\u5b9f\u884c\u4e2d\u306b LED \u3092\u5225\u306e\u30d4\u30f3\u306b\u5dee\u3057\u66ff\u3048\u308b\u3053\u3068\u306f\u306a\u3044\u305f\u3081\u5b9a\u6570\u306b\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>12\u884c\u76ee\u306e <strong>digitalWrite(led, HIGH)<\/strong> \u3067\u3001LED \u3092\u70b9\u706f\u3055\u305b\u3001\u6b21\u306e\u884c\u306e <strong>delay(1000)<\/strong> \u30671\u79d2\u5f85\u305f\u305b\u3066\u3044\u307e\u3059\uff08\u3064\u307e\u308a\u3001LED \u306f1\u79d2\u70b9\u706f\u3057\u7d9a\u3051\u307e\u3059\uff09\u3002<\/p>\n<p>14\u884c\u76ee\u306e <strong>digitalWrite(led, LOW)<\/strong> \u3067 LED \u3092\u6d88\u706f\u3055\u305b\u3001\u6b21\u306e\u884c\u306e <strong>delay(1000)<\/strong> \u30671\u79d2\u5f85\u305f\u305b\u3066\u3044\u307e\u3059\uff08\u3064\u307e\u308a\u3001LED \u306f1\u79d2\u6d88\u706f\u3057\u7d9a\u3051\u307e\u3059\uff09\u3002<\/p>\n<p>12\u301c15\u884c\u76ee\u306f <strong>void loop() {}<\/strong> \u3067\u56f2\u307e\u308c\u3066\u3044\u308b\u305f\u3081\u300112\u301c15\u884c\u76ee\u306f\u3072\u305f\u3059\u3089\u30eb\u30fc\u30d7\u3057\u307e\u3059\u3002<\/p>\n<p>\u3064\u307e\u308a\u30011\u79d2\u3054\u3068\u306b LED \u304c\u70b9\u706f\u3057\u305f\u308a\u6d88\u706f\u3057\u305f\u308a\u3068\u3044\u3046\u52d5\u4f5c\u3092\u7e70\u308a\u8fd4\u3057\u307e\u3059\u3002<\/p>\n<h3><span class=\"ez-toc-section\" id=\"%E3%82%BB%E3%83%83%E3%83%88%E3%82%A2%E3%83%83%E3%83%97\"><\/span>\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Mac \u306b PocketDuino \u3092 USB \u63a5\u7d9a\u3057\u3001Arduino IDE \u3067 (\u2192) \u30dc\u30bf\u30f3\u3092\u62bc\u3059\u3068\u3001\u30d7\u30ed\u30b0\u30e9\u30e0\u304c\u30b3\u30f3\u30d1\u30a4\u30eb\u3055\u308c\u3066 PocketDuino \u306b\u66f8\u304d\u8fbc\u307e\u308c\u307e\u3059\u3002<\/p>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/stocker.jp\/diary\/wp-content\/uploads\/shining-advent-calendar-2.png?resize=500%2C300&#038;ssl=1\" alt=\"Arduino IDE\" width=\"500\" height=\"300\" class=\"aligncenter size-full wp-image-4509\" srcset=\"https:\/\/i0.wp.com\/stocker.jp\/diary\/wp-content\/uploads\/shining-advent-calendar-2.png?w=500&amp;ssl=1 500w, https:\/\/i0.wp.com\/stocker.jp\/diary\/wp-content\/uploads\/shining-advent-calendar-2.png?resize=300%2C180&amp;ssl=1 300w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/p>\n<p>LED \u306e\u9577\u3044\u65b9\u306e\u811a\u3092 PocketDuino \u306e2\u756a\u30d4\u30f3\u306b\u3001\u77ed\u3044\u65b9\u306e\u811a\u3092 PocketDuino \u306e GND \u3068\u66f8\u304b\u308c\u3066\u3044\u308b\u30d4\u30f3\u306b\u5dee\u3057\u8fbc\u307f\u307e\u3059\u3002<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/stocker.jp\/diary\/wp-content\/uploads\/shining-advent-calendar-3.jpg?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/stocker.jp\/diary\/wp-content\/uploads\/shining-advent-calendar-3.jpg?resize=500%2C333&#038;ssl=1\" alt=\"PocketDuino\" width=\"500\" height=\"333\" class=\"aligncenter size-large wp-image-4510\" srcset=\"https:\/\/i0.wp.com\/stocker.jp\/diary\/wp-content\/uploads\/shining-advent-calendar-3.jpg?resize=500%2C333&amp;ssl=1 500w, https:\/\/i0.wp.com\/stocker.jp\/diary\/wp-content\/uploads\/shining-advent-calendar-3.jpg?resize=300%2C200&amp;ssl=1 300w, https:\/\/i0.wp.com\/stocker.jp\/diary\/wp-content\/uploads\/shining-advent-calendar-3.jpg?w=1000&amp;ssl=1 1000w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/a><\/p>\n<p>PocketDuino \u306e USB \u7aef\u5b50\u3092\u3001Nexus 7 \u4e0b\u90e8\u306e USB \u7aef\u5b50\u306b\u5dee\u3057\u8fbc\u307f\u307e\u3059\u3002<\/p>\n<p>\u3059\u308b\u3068\u3001Nexus 7 \u304b\u3089 PocketDuino \u306b\u96fb\u529b\u304c\u4f9b\u7d66\u3055\u308c\u3001LED \u304c\u70b9\u6ec5\u3092\u59cb\u3081\u307e\u3059\u3002<\/p>\n<p><iframe loading=\"lazy\" width=\"600\" height=\"338\" src=\"\/\/www.youtube-nocookie.com\/embed\/kDOakYbbAUE\" frameborder=\"0\" allowfullscreen><\/iframe><\/p>\n<p>\u660e\u65e5\u306e <a href=\"http:\/\/www.adventar.org\/calendars\/371\" target=\"_blank\">\u5149 Advent Calendar 2014<\/a> \u306f KanaLier \u3055\u3093\u3067\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3068\u3042\u308bWeb\u5236\u4f5c\u8005\u306e\u65b9\u304c\u300cNexus 7 \u306e\u5bfe\u5fdc\u306f\u95c7\u3060\u300d\u3068\u8a71\u3057\u3066\u3044\u305f\u306e\u3067\u3001\u5149\u3067\u7167\u3089\u3059\u3053\u3068\u306b\u3057\u307e\u3057\u305f\u3002<br \/>\n\uff08\u3053\u308c\u306f\u30cd\u30bf\u8a18\u4e8b\u3067\u3059\u3002\u30c7\u30b6\u30a4\u30f3\u3084 Web \u306e\u6280\u8853\u3068\u306f 1px \u3082\u95a2\u4fc2\u3042\u308a\u307e\u305b\u3093\uff09<\/p>\n","protected":false},"author":1,"featured_media":6710,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[64],"tags":[72,73],"class_list":["post-4500","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-android","tag-arduino","tag-73"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/stocker.jp\/diary\/wp-content\/uploads\/shining-advent-calendar-2-1.png?fit=500%2C300&ssl=1","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/stocker.jp\/diary\/wp-json\/wp\/v2\/posts\/4500","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/stocker.jp\/diary\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/stocker.jp\/diary\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/stocker.jp\/diary\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/stocker.jp\/diary\/wp-json\/wp\/v2\/comments?post=4500"}],"version-history":[{"count":0,"href":"https:\/\/stocker.jp\/diary\/wp-json\/wp\/v2\/posts\/4500\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/stocker.jp\/diary\/wp-json\/wp\/v2\/media\/6710"}],"wp:attachment":[{"href":"https:\/\/stocker.jp\/diary\/wp-json\/wp\/v2\/media?parent=4500"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/stocker.jp\/diary\/wp-json\/wp\/v2\/categories?post=4500"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/stocker.jp\/diary\/wp-json\/wp\/v2\/tags?post=4500"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}