{"id":809,"date":"2019-12-26T23:48:34","date_gmt":"2019-12-26T14:48:34","guid":{"rendered":"https:\/\/dalomo.net\/blog\/?p=809"},"modified":"2019-12-26T23:48:34","modified_gmt":"2019-12-26T14:48:34","slug":"arduino%e3%81%a7%e3%83%a2%e3%83%bc%e3%82%bf%e3%83%bc%e3%81%a7%e5%8b%95%e3%81%8f%e8%bb%8a%e3%82%92%e4%bd%9c%e3%82%8a%e3%81%9f%e3%81%84","status":"publish","type":"post","link":"https:\/\/dalomo.net\/blog\/2019\/12\/26\/809\/","title":{"rendered":"Arduino\u3067\u30e2\u30fc\u30bf\u30fc\u3067\u52d5\u304f\u8eca\u3092\u4f5c\u308a\u305f\u3044"},"content":{"rendered":"<h1>Arduino+DRV8835<\/h1>\n<p>\u30e2\u30fc\u30bf\u30fc\u3067\u52d5\u304f\u8eca\u3068\u66f8\u3044\u305f\u3051\u3069\u3001\u3053\u3046\u3044\u3046\u306e\u306e\u7dcf\u79f0\u3063\u3066\u306a\u3093\u3066\u3044\u3046\u3093\u3060\u308d\u3046\u3002\u30e2\u30fc\u30bf\u30fc\u30ab\u30fc\u3082\u306a\u3093\u304b\u9055\u3046\u3057\u3001\u30e9\u30b8\u30b3\u30f3\u3082\u7121\u7dda\u64cd\u7e26\u3057\u3066\u308b\u308f\u3051\u3058\u3083\u306a\u3044\u304b\u3089\u9055\u3046\u3002\u30b9\u30de\u30fc\u30c8\u30ab\u30fc\u3063\u3066\u3044\u3046\u307b\u3069\u9ad8\u5ea6\u306a\u6a5f\u80fd\u306f\u3064\u3044\u3066\u306a\u3044\u3057\u3001\u81ea\u52d5\u904b\u8ee2\u8eca\u3063\u3066\u3044\u3046\u3068\u4eba\u3092\u4e57\u305b\u308b\u611f\u304c\u3042\u308b\u3002\u30df\u30cb\u30ab\u30fc\u3060\u3068\u52d5\u304b\u306a\u3044\u611f\u3058\u304c\u3059\u308b\u3057\u3001\u96e3\u3057\u3044\u306d\u3002<\/p>\n<h2>\u304a\u8cb7\u3044\u7269<\/h2>\n<h3>\u8eca\u4f53<\/h3>\n<p>\u8eca\u4f53\u3092\u8cb7\u304a\u3046\u3068\u601d\u3044Amazon\u3084eBay\u3092\u63a2\u3057\u3066\u307f\u305f\u3051\u3069\u3001\u3042\u306e\u9ec4\u8272\u3044\u30bf\u30a4\u30e4\u306e\u3064\u3044\u305f\u3084\u3064\u3057\u304b\u898b\u3064\u304b\u3089\u306a\u3044\u3002\u3061\u3087\u3063\u3068\u5927\u304d\u3044\u3057\u306a\u3093\u304b\u5c0f\u3055\u3044\u611f\u3058\u306e\u306a\u3044\u304b\u306a\u30fc\u3068\u601d\u3063\u3066\u63a2\u3057\u7d9a\u3051\u3066\u3044\u305f\u3089xt-xinte\u3067\u3044\u3044\u611f\u3058\u306e\u3092\u898b\u3064\u3051\u305f\u3002<\/p>\n<p><a href=\"https:\/\/www.xt-xinte.com\/h-product-detail.html?goods_id=576588\">https:\/\/www.xt-xinte.com\/h-product-detail.html?goods_id=576588<\/a><\/p>\n<p>\u3053\u308c\u3002<\/p>\n<p><a href=\"https:\/\/dalomo.net\/blog\/wp-content\/uploads\/2019\/12\/mc01.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-812\" src=\"https:\/\/dalomo.net\/blog\/wp-content\/uploads\/2019\/12\/mc01-225x300.png\" alt=\"\" width=\"225\" height=\"300\" srcset=\"https:\/\/dalomo.net\/blog\/wp-content\/uploads\/2019\/12\/mc01-225x300.png 225w, https:\/\/dalomo.net\/blog\/wp-content\/uploads\/2019\/12\/mc01.png 750w\" sizes=\"auto, (max-width: 225px) 100vw, 225px\" \/><\/a><\/p>\n<p>\u5c4a\u3044\u305f\u3002\u3081\u3061\u3083\u3081\u3061\u3083\u96d1\u591a\u306b\u888b\u306b\u653e\u308a\u8fbc\u307e\u308c\u3066\u304a\u308a\u3001\u76ba\u304f\u3061\u3083\u306e\u8aac\u660e\u66f8\u304c\u30da\u30e9\u30a4\u30c1\u3067\u5165\u3063\u3066\u308b\u3060\u3051\u3068\u3044\u3046\u3001\u7c21\u7d20\u306a\u30d1\u30c3\u30b1\u30fc\u30b8\u3067\u3059\u306d\u3002<\/p>\n<p><a href=\"https:\/\/dalomo.net\/blog\/wp-content\/uploads\/2019\/12\/mc02.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-810\" src=\"https:\/\/dalomo.net\/blog\/wp-content\/uploads\/2019\/12\/mc02-225x300.png\" alt=\"\" width=\"225\" height=\"300\" srcset=\"https:\/\/dalomo.net\/blog\/wp-content\/uploads\/2019\/12\/mc02-225x300.png 225w, https:\/\/dalomo.net\/blog\/wp-content\/uploads\/2019\/12\/mc02.png 750w\" sizes=\"auto, (max-width: 225px) 100vw, 225px\" \/><\/a><\/p>\n<p>\u8aac\u660e\u66f8\u306f\u5168\u90e8\u4e2d\u56fd\u8a9e\u3002\u3067\u3082\u5199\u771f\u3044\u3063\u3071\u3044\u3060\u3057\u69cb\u9020\u3082\u7c21\u5358\u306a\u306e\u3067\u3059\u3050\u7d44\u307f\u7acb\u3066\u3089\u308c\u305f\u3002<\/p>\n<p><a href=\"https:\/\/dalomo.net\/blog\/wp-content\/uploads\/2019\/12\/mc03.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-811\" src=\"https:\/\/dalomo.net\/blog\/wp-content\/uploads\/2019\/12\/mc03-300x225.png\" alt=\"\" width=\"300\" height=\"225\" srcset=\"https:\/\/dalomo.net\/blog\/wp-content\/uploads\/2019\/12\/mc03-300x225.png 300w, https:\/\/dalomo.net\/blog\/wp-content\/uploads\/2019\/12\/mc03-768x576.png 768w, https:\/\/dalomo.net\/blog\/wp-content\/uploads\/2019\/12\/mc03.png 1000w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>\u3058\u3083\u30fc\u3093\u3002\u8eca\u4f53\u304c\u3067\u304d\u305f\u3088\u3002<\/p>\n<h3>DC-DC\u964d\u5727USB\u30e2\u30b8\u30e5\u30fc\u30eb<\/h3>\n<p><a href=\"https:\/\/www.diymore.cc\/collections\/all-about-arduino\/products\/diymore-beetle-badusb-micro-atmega32u4-au-development-expansion-module-board-for-arduino-leonardo-r3-5v-i2c\">\u3061\u3063\u3053\u3044Arduino\u4e92\u63db\u54c1<\/a>\u3092\u4f7f\u304a\u3046\u3068\u601d\u3063\u3066\u3044\u3066\u3001USB\u7d66\u96fb\u306a\u306e\u3067\u305d\u3053\u306b\u7d66\u96fb\u3067\u304d\u308b\u3088\u3046\u306b\u3057\u306a\u3044\u3068\u3044\u3051\u306a\u3044\u3002\u96fb\u6c60\u3092\u4f7f\u304a\u3046\u3068\u601d\u3063\u3066\u3044\u308b\u306e\u3060\u3051\u3069\u96fb\u6c60\u306f\u4e00\u672c1.5V\u30024\u672c\u30676V\u306a\u306e\u3067\u5b9a\u683c\u8d85\u3048\u3061\u3083\u3046\u304b\u3089\u964d\u5727\u3082\u307b\u3057\u3044\u3002\u3068\u3044\u3046\u3053\u3068\u3067\u305d\u308c\u306b\u5408\u3044\u305d\u3046\u306a\u90e8\u54c1\u3092\u8cb7\u3046\u3002\u3053\u308c\u3082\u3061\u3063\u3061\u3083\u3044\u306e\u304c\u3044\u3044\u306a\u30fc\u3068\u63a2\u3057\u3066\u307f\u305f\u3089<a href=\"https:\/\/www.ebay.com\/sch\/i.html?&amp;_nkw=USB+Step+Down+Module\">eBay<\/a>\u306b\u305d\u308c\u3063\u307d\u3044\u306e\u304c\u3042\u3063\u305f\u3002\u7d50\u69cb\u7a2e\u985e\u304c\u3042\u3063\u3066\u3001\u6a5f\u80fd\u7684\u306b\u306f\u5927\u4f53\u4e00\u7dd2\u3063\u307d\u3044\u3093\u3060\u3051\u3069\u4f7f\u3048\u306a\u304b\u3063\u305f\u3089\u30e4\u306a\u306e\u3067\u7a2e\u985e\u5909\u3048\u3066\u4f55\u500b\u304b\u8cb7\u3063\u305f\u3002\u7d50\u5c40\u52d5\u3044\u305f\u306e\u306f<\/p>\n<p><a href=\"https:\/\/dalomo.net\/blog\/wp-content\/uploads\/2019\/12\/mc04.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-813\" src=\"https:\/\/dalomo.net\/blog\/wp-content\/uploads\/2019\/12\/mc04-300x225.png\" alt=\"\" width=\"300\" height=\"225\" srcset=\"https:\/\/dalomo.net\/blog\/wp-content\/uploads\/2019\/12\/mc04-300x225.png 300w, https:\/\/dalomo.net\/blog\/wp-content\/uploads\/2019\/12\/mc04-768x576.png 768w, https:\/\/dalomo.net\/blog\/wp-content\/uploads\/2019\/12\/mc04.png 1000w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>\u3060\u3051\u304b\u306a\uff1f\u3042\u3001\u9806\u756a\u306b\u8a66\u3057\u3066\u3044\u3063\u3066\u3053\u308c\u4f7f\u3063\u3066\u521d\u3081\u3066\u52d5\u3044\u305f\u306e\u3067\u3053\u308c\u306b\u3057\u305f\u3093\u3060\u3002\u3068\u3044\u3046\u3053\u3068\u3067\u96fb\u6e90\u306f\u3053\u308c\u3067\u30aa\u30c3\u30b1\u30fc\u3002<\/p>\n<h2>\u914d\u7dda\u3059\u308b<\/h2>\n<p>\u56de\u8def\u56f3\u3092\u4f5c\u308d\u3046\u3068\u601d\u3063\u305f\u3093\u3060\u3051\u3069\u306a\u3093\u304b\u3081\u3093\u3069\u304f\u3055\u304b\u3063\u305f\u306e\u3067\u4f5c\u3063\u3066\u306a\u3044\u3002\u6c17\u304c\u5411\u3044\u305f\u3089\u4f5c\u308d\u3046\u3002<\/p>\n<p>\u914d\u7dda\u306f\u30fc\u3001\u96fb\u6c60\u30dc\u30c3\u30af\u30b9\u304b\u3089USB\u30e2\u30b8\u30e5\u30fc\u30eb\u304b\u307e\u3057\u3066Arduino\u3078\u3068\u3001DRV8835\u3078\u3002\u3067\u3001Arduino\u304b\u3089DRV8835\u3078\u3002\u305d\u3093\u3067DRV8835\u304b\u30892\u3064\u306e\u30e2\u30fc\u30bf\u30fc\u3078\u7e4b\u3050\u611f\u3058\u306b\u3057\u305f\u3002\u8a00\u8449\u3060\u3068\u5206\u304b\u308a\u3065\u3089\u3044\u3002<\/p>\n<p><a href=\"https:\/\/dalomo.net\/blog\/wp-content\/uploads\/2019\/12\/mc05.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-814\" src=\"https:\/\/dalomo.net\/blog\/wp-content\/uploads\/2019\/12\/mc05-300x225.png\" alt=\"\" width=\"300\" height=\"225\" srcset=\"https:\/\/dalomo.net\/blog\/wp-content\/uploads\/2019\/12\/mc05-300x225.png 300w, https:\/\/dalomo.net\/blog\/wp-content\/uploads\/2019\/12\/mc05-768x576.png 768w, https:\/\/dalomo.net\/blog\/wp-content\/uploads\/2019\/12\/mc05.png 1000w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>\u3053\u3093\u306a\u306a\u3063\u305f\u3002\u914d\u7dda\u3063\u3066\u5fae\u5999\u306b\u30bb\u30f3\u30b9\u3044\u308b\u306e\u306d\u3002\u306a\u3093\u304b\u3046\u307e\u3044\u3053\u3068\u53ce\u307e\u3089\u306a\u304f\u3066\u898b\u3066\u304f\u308c\u60aa\u304f\u306a\u3063\u3061\u3083\u3063\u305f\u3002\u8eca\u4f53\u3068\u30d1\u30fc\u30c4\u306f\u30de\u30b8\u30c3\u30af\u30c6\u30fc\u30d7\u3067\u304f\u3063\u3064\u3051\u305f\u3002<\/p>\n<h2>\u30b9\u30b1\u30c3\u30c1\u3092\u66f8\u304f<\/h2>\n<pre><code class=\"cpp\">int PIN_IN_A1 = 9;\r\nint PIN_IN_A2 = 10;\r\nint PIN_IN_B1 = 1;\r\nint PIN_IN_B2 = 11;\r\n\r\nvoid setup() {\r\n  pinMode(PIN_IN_A1, OUTPUT);\r\n  pinMode(PIN_IN_A2, OUTPUT);\r\n  pinMode(PIN_IN_B1, OUTPUT);\r\n  pinMode(PIN_IN_B2, OUTPUT);\r\n\r\n}\r\n\r\nvoid forward() {\r\n  digitalWrite(PIN_IN_A1, HIGH);\r\n  digitalWrite(PIN_IN_A2, LOW);\r\n  digitalWrite(PIN_IN_B1, HIGH);\r\n  digitalWrite(PIN_IN_B2, LOW);\r\n}\r\n\r\nvoid brake() {\r\n  digitalWrite(PIN_IN_A1, LOW);\r\n  digitalWrite(PIN_IN_A2, LOW);\r\n  digitalWrite(PIN_IN_B1, LOW);\r\n  digitalWrite(PIN_IN_B2, LOW);\r\n}\r\n\r\nvoid reverse() {\r\n  digitalWrite(PIN_IN_A1, LOW);\r\n  digitalWrite(PIN_IN_A2, HIGH);\r\n  digitalWrite(PIN_IN_B1, LOW);\r\n  digitalWrite(PIN_IN_B2, HIGH);\r\n}\r\n\r\nvoid coast() {\r\n  digitalWrite(PIN_IN_A1, HIGH);\r\n  digitalWrite(PIN_IN_A2, HIGH);\r\n  digitalWrite(PIN_IN_B1, HIGH);\r\n  digitalWrite(PIN_IN_B2, HIGH);\r\n}\r\n\r\nvoid turnLeft() {\r\n  digitalWrite(PIN_IN_A1, LOW);\r\n  digitalWrite(PIN_IN_A2, LOW);\r\n  digitalWrite(PIN_IN_B1, HIGH);\r\n  digitalWrite(PIN_IN_B2, LOW);\r\n}\r\n\r\nvoid turnRight() {\r\n  digitalWrite(PIN_IN_A1, HIGH);\r\n  digitalWrite(PIN_IN_A2, LOW);\r\n  digitalWrite(PIN_IN_B1, LOW);\r\n  digitalWrite(PIN_IN_B2, LOW);\r\n}\r\n\r\nvoid rotateLeft() {\r\n  digitalWrite(PIN_IN_A1, LOW);\r\n  digitalWrite(PIN_IN_A2, HIGH);\r\n  digitalWrite(PIN_IN_B1, HIGH);\r\n  digitalWrite(PIN_IN_B2, LOW);\r\n}\r\n\r\nvoid rotateRight() {\r\n  digitalWrite(PIN_IN_A1, HIGH);\r\n  digitalWrite(PIN_IN_A2, LOW);\r\n  digitalWrite(PIN_IN_B1, LOW);\r\n  digitalWrite(PIN_IN_B2, HIGH);\r\n}\r\n\r\nvoid loop() {\r\n  forward();\r\n  delay(3000);\r\n  brake();\r\n  delay(3000);\r\n  reverse();\r\n  delay(3000);\r\n  coast();\r\n  delay(3000);\r\n  turnLeft();\r\n  delay(3000);\r\n  brake();\r\n  delay(3000);\r\n  turnRight();\r\n  delay(3000);\r\n  brake();\r\n  delay(3000);\r\n  rotateLeft();\r\n  delay(3000);\r\n  brake();\r\n  delay(3000);\r\n  rotateRight();\r\n  delay(3000);\r\n  brake();\r\n  delay(3000);\r\n}<\/code><\/pre>\n<p>\u3069\u3046\u66f8\u304f\u306e\u304c\u3044\u3044\u304b\u306a\u30fc\u3068\u8003\u3048\u3066\u3001\u52d5\u304d\u3054\u3068\u306b\u95a2\u6570\u3092\u4f5c\u3063\u3066\u3001Loop\u3067\u305d\u308c\u3092\u547c\u3073\u51fa\u3059\u611f\u3058\u306b\u3057\u305f\u3002\u524d\u9032\u30fb\u5f8c\u9000\u30fb\u505c\u6b62\u30fb\u7a7a\u8ee2\u30fb\u53f3\u6298\u30fb\u5de6\u6298\u30fb\u53f3\u65cb\u56de\u30fb\u5de6\u65cb\u56de\u3092\u4f5c\u3063\u305f\u3002\u3048\u3089\u3044\u9577\u304f\u306a\u3063\u3066\u3001\u540c\u3058\u3088\u3046\u306a\u30b3\u30fc\u30c9\u304c\u4e26\u3093\u3067\u3044\u308b\u306e\u3067\u3082\u3063\u3068\u77ed\u304f\u3067\u304d\u305d\u3046\u3060\u306a\u30fc\u3063\u3066\u601d\u3063\u305f\u3002\u5f8c\u3067\u8003\u3048\u3066\u307f\u3088\u3046\u304b\u306a\u3002<\/p>\n<h2>\u5b8c\u6210<\/h2>\n<p><iframe loading=\"lazy\" src=\"https:\/\/www.youtube.com\/embed\/eL8m1ZrFLNU\" width=\"560\" height=\"315\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"><\/iframe><\/p>\n<p>\u3067\u304d\u305f\uff01\u96fb\u6c60\u30dc\u30c3\u30af\u30b9\u304c\u610f\u5916\u3068\u91cd\u3044\u306e\u3067\u52d5\u304d\u304c\u30ae\u30af\u30b7\u30e3\u30af\u3057\u3066\u3093\u306d\uff57\u96fb\u5727\u3068\u96fb\u6d41\u306e\u3069\u3063\u3061\u3092\u9ad8\u304f\u3059\u308c\u3070\u3044\u3044\u3093\u304b\u306a\u3002\u305d\u308c\u3068\u3082\u96fb\u6c60\u53584\u306b\u5909\u3048\u3088\u3046\u304b\u306a\u3002\u305d\u308c\u306f\u307e\u3041\u5f8c\u3067\u3084\u3063\u3066\u307f\u308b\u3068\u3057\u3066\u3001\u65e9\u304fBluetooth\u30e2\u30b8\u30e5\u30fc\u30eb\u5c4a\u304b\u306a\u3044\u304b\u306a\u3041\uff5e\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Arduino+DRV8835 \u30e2\u30fc\u30bf\u30fc\u3067\u52d5\u304f\u8eca\u3068\u66f8\u3044\u305f\u3051\u3069\u3001\u3053\u3046\u3044\u3046\u306e\u306e\u7dcf\u79f0\u3063\u3066\u306a\u3093\u3066\u3044\u3046\u3093\u3060\u308d\u3046\u3002\u30e2\u30fc\u30bf\u30fc\u30ab\u30fc\u3082\u306a\u3093\u304b\u9055\u3046\u3057\u3001\u30e9\u30b8\u30b3\u30f3\u3082\u7121\u7dda\u64cd\u7e26\u3057\u3066\u308b\u308f\u3051\u3058\u3083\u306a\u3044\u304b\u3089\u9055\u3046\u3002\u30b9\u30de\u30fc\u30c8\u30ab\u30fc\u3063\u3066\u3044\u3046\u307b\u3069\u9ad8\u5ea6\u306a\u6a5f\u80fd\u306f\u3064\u3044\u3066\u306a &hellip; <a href=\"https:\/\/dalomo.net\/blog\/2019\/12\/26\/809\/\">\u7d9a\u304d\u3092\u8aad\u3080 <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":811,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"categories":[8],"tags":[69,78,66,54],"class_list":["post-809","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-8","tag-arduino","tag-bluetooth","tag-drv8835","tag-54"],"_links":{"self":[{"href":"https:\/\/dalomo.net\/blog\/wp-json\/wp\/v2\/posts\/809","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dalomo.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dalomo.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dalomo.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/dalomo.net\/blog\/wp-json\/wp\/v2\/comments?post=809"}],"version-history":[{"count":1,"href":"https:\/\/dalomo.net\/blog\/wp-json\/wp\/v2\/posts\/809\/revisions"}],"predecessor-version":[{"id":815,"href":"https:\/\/dalomo.net\/blog\/wp-json\/wp\/v2\/posts\/809\/revisions\/815"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/dalomo.net\/blog\/wp-json\/wp\/v2\/media\/811"}],"wp:attachment":[{"href":"https:\/\/dalomo.net\/blog\/wp-json\/wp\/v2\/media?parent=809"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dalomo.net\/blog\/wp-json\/wp\/v2\/categories?post=809"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dalomo.net\/blog\/wp-json\/wp\/v2\/tags?post=809"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}