{"id":2644,"date":"2016-08-06T14:28:04","date_gmt":"2016-08-06T05:28:04","guid":{"rendered":"http:\/\/pokosho.com\/b\/?p=2644"},"modified":"2026-01-29T09:42:44","modified_gmt":"2026-01-29T00:42:44","slug":"%e4%b8%ad%e5%9b%bd%e3%81%ae%e6%bf%80%e5%ae%89arduino%e3%82%92%e8%b2%b7%e3%81%a3%e3%81%a6%e3%81%bf%e3%81%9f","status":"publish","type":"post","link":"https:\/\/pokosho.com\/b\/archives\/2644","title":{"rendered":"\u4e2d\u56fd\u306e\u6fc0\u5b89Arduino\u3092\u8cb7\u3063\u3066\u307f\u305f\u3002Arduino\u3067midi\u97f3\u6e90\u3092\u9cf4\u3089\u3057\u3066\u307f\u305f\u3002"},"content":{"rendered":"<blockquote class=\"twitter-tweet\" data-lang=\"ja\">\n<p dir=\"ltr\" lang=\"ja\">\u683c\u5b89Arduino\u52d5\u3044\u305f\u3088\u301c\uff01 <a href=\"https:\/\/t.co\/1ZuYBJBQdT\">pic.twitter.com\/1ZuYBJBQdT<\/a><\/p>\n<p>\u2014 \u30ab\u30a4\u30d0 (@kaiba) <a href=\"https:\/\/twitter.com\/kaiba\/status\/761784474958897152\">2016\u5e748\u67086\u65e5<\/a><\/p><\/blockquote>\n<p><script async src=\"\/\/platform.twitter.com\/widgets.js\" charset=\"utf-8\"><\/script><\/p>\n<ul>\n<li><a href=\"http:\/\/www.banggood.com\/5Pcs-ATmega328P-Nano-V3-Controller-Board-For-Arduino-Improved-Version-p-951797.html\">5Pcs ATmega328P Nano V3 Controller Board<\/a><\/li>\n<li><a href=\"http:\/\/www.banggood.com\/UNO-R3-ATmega328P-Development-Board-For-Arduino-No-Cable-p-964163.html\">Geekcreit\u2122 UNO R3 ATmega328P Development Board<\/a><\/li>\n<\/ul>\n<p>Nano 5\u679a\u30671500\u5186(300\u5186\/\u679a)\u3001UNO\u304c400\u5186!<br \/>\n\u3053\u306e\u5024\u6bb5\u306a\u3089\u6c17\u8efd\u306b\u4f7f\u3048\u305d\u3046!<\/p>\n<h3>2016\u5e74\u306e\u60c5\u5831<\/h3>\n<p>\u5b89\u30c1\u30c3\u30d7\u306e\u305f\u3081\u3001Arduino IDE\u3067\u8a8d\u8b58\u3059\u308b\u305f\u3081\u306b\u3001<a href=\"http:\/\/kig.re\/2014\/12\/31\/how-to-use-arduino-nano-mini-pro-with-CH340G-on-mac-osx-yosemite.html\">\u30c9\u30e9\u30a4\u30d0<\/a>\u3092\u5225\u9014\u5165\u308c\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3057\u305f\u3002<br \/>\nOSX Elcapitan\u3001Arduino IDE 1.6.10\u3067\u52d5\u304d\u307e\u3057\u305f\u3002<\/p>\n<pre class=\"brush: cpp; title: ; notranslate\" title=\"\">\r\nvoid setup() {\r\n  \/\/ initialize digital pin 13 as an output.\r\n  pinMode(2, OUTPUT);\r\n}\r\n\r\n\/\/ the loop function runs over and over again forever\r\nvoid loop() {\r\n  digitalWrite(2, HIGH);   \/\/ turn the LED on (HIGH is the voltage level)\r\n  delay(150);              \/\/ wait for a second\r\n  digitalWrite(2, LOW);    \/\/ turn the LED off by making the voltage LOW\r\n  delay(150);              \/\/ wait for a second\r\n}\r\n<\/pre>\n<p>\u3053\u306e\u3088\u3046\u306a\u30b3\u30fc\u30c9\u3092\u66f8\u304d\u3001D2\u306b\u62b5\u6297\u3068LED\u3092\u3055\u3057\u3066L\u30c1\u30ab\u3092\u78ba\u8a8d\u3057\u305f\u3002<br \/>\n13\u756aPIN\u3092\u4f7f\u3046\u3068\u30dc\u30fc\u30c9\u4e0a\u306eLED\u304cL\u30c1\u30ab\u3057\u307e\u3059\u3002<\/p>\n<ul>\n<li>\u30dc\u30fc\u30c9\u306fArduino Nano<\/li>\n<li>\u30d7\u30ed\u30bb\u30c3\u30b5\u306f ATmega328p(old bootloader)\u3092\u4f7f\u7528\u3059\u308b\u5fc5\u8981\u304c\u3042\u3063\u305f<\/li>\n<\/ul>\n<h3>2026\u5e74\u306e\u60c5\u5831: midi\u3092\u9cf4\u3089\u3057\u305f\u3044<\/h3>\n<p>10\u5e74\u5f8c\u306b\u66f4\u65b0\u3059\u308b\u3053\u3068\u304c\u3042\u308d\u3046\u3068\u306f\u30022026\u5e74\u306e\u60c5\u5831\u3092\u8ffd\u8a18\u3057\u307e\u3059\u3002<br \/>\n\u306a\u3093\u3067Arduino\u3092\u3044\u3058\u308a\u3060\u3057\u305f\u304b\u3068\u3044\u3046\u3068midi\u3092\u306a\u3089\u3057\u305f\u304b\u3063\u305f\u304b\u3089\u3067\u3059\u3002<br \/>\nmidi\u306f\u7c21\u5358\u3067\u3059\u306d\u3002<\/p>\n<p><a href=\"http:\/\/pokosho.com\/b\/wp-content\/uploads\/2016\/08\/743406e59e45fc70e2ff4eb9b253b540.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-1429612\" src=\"http:\/\/pokosho.com\/b\/wp-content\/uploads\/2016\/08\/743406e59e45fc70e2ff4eb9b253b540-254x300.png\" alt=\"\" width=\"254\" height=\"300\" srcset=\"https:\/\/pokosho.com\/b\/wp-content\/uploads\/2016\/08\/743406e59e45fc70e2ff4eb9b253b540-254x300.png 254w, https:\/\/pokosho.com\/b\/wp-content\/uploads\/2016\/08\/743406e59e45fc70e2ff4eb9b253b540.png 738w\" sizes=\"auto, (max-width: 254px) 100vw, 254px\" \/><\/a><\/p>\n<p>M1 mac\u3067\u30dc\u30fc\u30c9\u3092Nano\u3001\u30dd\u30fc\u30c8\u3092\u304a\u4f7f\u3044\u306eUSB\u3001\u30d7\u30ed\u30bb\u30c3\u30b5\u306f ATmega328p(old bootloader)\u3067\u52d5\u4f5c\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>Gemini\u306b\u30b3\u30fc\u30c9\u3092\u66f8\u3044\u3066\u3082\u3089\u3044\u307e\u3057\u305f\u3002<\/p>\n<pre class=\"brush: cpp; title: ; notranslate\" title=\"\">\r\n\/\/ MIDI\u306e\u30c1\u30e3\u30f3\u30cd\u30eb\u6307\u5b9a\uff080 = \u30c1\u30e3\u30f3\u30cd\u30eb1\uff09\r\nbyte midiCh = 0;\r\n\r\nvoid setup() {\r\n  \/\/ MIDI\u6a19\u6e96\u30dc\u30fc\u30ec\u30fc\u30c8\r\n  Serial.begin(31250);\r\n}\r\n\r\nvoid loop() {\r\n  for (int note = 30; note &lt;= 72; note++) {\r\n    \/\/ \u30c9\u3001\u30ec\u3001\u30df\u3001\u30d5\u30a1\u3001\u30bd\u3001\u30e9\u3001\u30b7\u3001\u30c9\u306e\u97f3\u968e\uff08\u534a\u97f3\u542b\u3080\uff09\u3092\u9806\u756a\u306b\r\n    \/\/ \u30d4\u30a2\u30ce\u306e\u767d\u3044\u9375\u76e4\u3060\u3051\u306b\u3059\u308b\u306a\u3089\u3001\u7279\u5b9a\u306e\u6570\u5024\u306e\u307f\u9078\u3076\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\r\n    \r\n    noteOn(0x90 | midiCh, note, 0x45); \/\/ \u97f3\u3092\u9cf4\u3089\u3059\uff08\u30d9\u30ed\u30b7\u30c6\u30a369\uff09\r\n    delay(500);                        \/\/ 0.5\u79d2\u5f85\u3064\r\n    noteOn(0x80 | midiCh, note, 0x00); \/\/ \u97f3\u3092\u6b62\u3081\u308b\r\n  }\r\n  delay(1000); \/\/ 1\u5468\u3057\u305f\u30891\u79d2\u4f11\u307f\r\n}\r\n\r\n\/\/ MIDI\u4fe1\u53f7\u3092\u9001\u308b\u305f\u3081\u306e\u95a2\u6570\r\nvoid noteOn(int cmd, int pitch, int velocity) {\r\n  Serial.write(cmd);      \/\/ \u30b9\u30c6\u30fc\u30bf\u30b9\u30d0\u30a4\u30c8\uff08Note On\/Off + \u30c1\u30e3\u30f3\u30cd\u30eb\uff09\r\n  Serial.write(pitch);    \/\/ \u30ce\u30fc\u30c8\u756a\u53f7\uff08\u97f3\u306e\u9ad8\u3055\uff09\r\n  Serial.write(velocity); \/\/ \u30d9\u30ed\u30b7\u30c6\u30a3\uff08\u97f3\u306e\u5f37\u3055\uff09\r\n}\r\n<\/pre>\n<p>midi\u30b1\u30fc\u30d6\u30eb\u3092\u5207\u65ad\u3057\u307e\u3057\u3066\u3001Arduino\u306b\u306f\u3093\u3060\u4ed8\u3051\u3057\u307e\u3059\u3002<\/p>\n<ul>\n<li>midi \u30d4\u30f34: 220\u03a9\u306e\u62b5\u6297\u3092\u4ecb\u3057\u3066 Arduino\u306e 5V \u3078<\/li>\n<li>midi \u30d4\u30f35: 220\u03a9\u306e\u62b5\u6297\u3092\u4ecb\u3057\u3066 Arduino\u306e TX (D1) \u3078<\/li>\n<li>midi \u30d4\u30f32: Arduino\u306e GND \u3078\uff08\u30b7\u30fc\u30eb\u30c9\u7dda\uff09<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p><iframe loading=\"lazy\" title=\"Arduino\u3067midi\u3092\u9cf4\u3089\u3059\" width=\"563\" height=\"1000\" src=\"https:\/\/www.youtube.com\/embed\/VLcApOf9TwQ?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe><\/p>\n<p>\u52d5\u3044\u305f\u301c\uff01 \u672c\u5f53\u306b\u3044\u3044\u6642\u4ee3\u306b\u306a\u308a\u307e\u3057\u305f\u306d\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u683c\u5b89Arduino\u52d5\u3044\u305f\u3088\u301c\uff01 pic.twitter.com\/1ZuYBJBQdT \u2014 \u30ab\u30a4\u30d0 (@kaiba) 2016\u5e748\u67086\u65e5 5Pcs ATmega328P Nano V3 Controller Board G [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":1429612,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[15],"tags":[],"class_list":["post-2644","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-electronics"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/pokosho.com\/b\/wp-json\/wp\/v2\/posts\/2644","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pokosho.com\/b\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pokosho.com\/b\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pokosho.com\/b\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pokosho.com\/b\/wp-json\/wp\/v2\/comments?post=2644"}],"version-history":[{"count":0,"href":"https:\/\/pokosho.com\/b\/wp-json\/wp\/v2\/posts\/2644\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/pokosho.com\/b\/wp-json\/wp\/v2\/media\/1429612"}],"wp:attachment":[{"href":"https:\/\/pokosho.com\/b\/wp-json\/wp\/v2\/media?parent=2644"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pokosho.com\/b\/wp-json\/wp\/v2\/categories?post=2644"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pokosho.com\/b\/wp-json\/wp\/v2\/tags?post=2644"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}