{"id":2198,"date":"2021-08-22T12:55:04","date_gmt":"2021-08-22T03:55:04","guid":{"rendered":"https:\/\/www.ekit-tech.com\/?p=2198"},"modified":"2021-12-06T17:45:42","modified_gmt":"2021-12-06T08:45:42","slug":"%e3%80%90raspberry-pi-pico%e3%80%91uart%e9%80%9a%e4%bf%a1%e3%81%a7dfplayer%e3%82%92%e5%88%b6%e5%be%a1%e3%81%99%e3%82%8b","status":"publish","type":"post","link":"https:\/\/www.ekit-tech.com\/?p=2198","title":{"rendered":"\u3010Raspberry Pi Pico\u3011UART\u901a\u4fe1\u3067DFPlayer\u3092\u5236\u5fa1\u3059\u308b"},"content":{"rendered":"\n<p>MP3\u518d\u751f\u30e2\u30b8\u30e5\u30fc\u30eb \u300eDFPlayer mini\u300f\u306f\u3001<a href=\"https:\/\/www.ekit-tech.com\/?p=786\">\u5358\u4f53\u3067\u3082\u4f7f\u7528\u53ef\u80fd<\/a>\u3067\u3059\u304c\u3001\u30de\u30a4\u30b3\u30f3\u3092\u4f7f\u3063\u305fUART\uff08\u975e\u540c\u671f\u30b7\u30ea\u30a2\u30eb\u901a\u4fe1\uff09\u3067\u5236\u5fa1\u3059\u308b\u3053\u3068\u3082\u53ef\u80fd\u3067\u3059\u3002<\/p>\n\n\n\n<p>\u4eca\u56de\u306f\u3001Raspberry Pi Pico\u3092\u4f7f\u3044\u3001DFPlayer\u306e\u97f3\u3092\u9cf4\u3089\u3059\u65b9\u6cd5\u3092\u7d39\u4ecb\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p><figure class=\"wp-block-embed-youtube wp-block-embed is-type-video is-provider-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper youtube\"><iframe src=\"https:\/\/www.youtube.com\/embed\/hlSo6L0RTXo\"><\/iframe><\/div><\/figure><\/p>\n\n\n\n<\/div><h2>\u914d\u7dda\u56f3<\/h2><div class=\"inner\">\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/www.ekit-tech.com\/wp-content\/uploads\/20210822-1.jpg\"><img src=\"https:\/\/www.ekit-tech.com\/wp-content\/uploads\/20210822-1.jpg\" alt=\"\u3010Raspberry Pi Pico\u3011UART\u901a\u4fe1\u3067DFPlayer\u3092\u5236\u5fa1\u3059\u308b\u305f\u3081\u306e\u914d\u7dda\u56f3\" class=\"wp-image-2201\"\/><\/a><\/figure>\n\n\n\n<\/div><h2>\u30d7\u30ed\u30b0\u30e9\u30e0\uff08MicroPython\uff09<\/h2><div class=\"inner\">\n\n\n\n<pre class=\"wp-block-code\"><code># \u30cf\u30fc\u30c9\u30a6\u30a7\u30a2\u95a2\u9023\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u8aad\u307f\u8fbc\u307f\nimport machine\n\n# UART\u521d\u671f\u8a2d\u5b9a\uff08UART\u756a\u53f7,\u30af\u30ed\u30c3\u30af\u30ec\u30fc\u30c8,TX\u30d4\u30f3\uff1aGP4\/6Pin,RX\u30d4\u30f3\uff1aGP5\/7Pin\uff09\nuart = machine.UART(1,baudrate=9600,tx = machine.Pin(4),rx = machine.Pin(5))\n\n# \u30b7\u30ea\u30a2\u30eb\u30c7\u30fc\u30bf\u306e\u4f5c\u6210\uff08\u4e00\u66f2\u3060\u3051\u3092\u518d\u751f\uff09\nsdata = bytearray(&#91;0x7E,0xFF,0x06,0x01,0x00,0x00,0x00,0xEF])\n\n# \u30b7\u30ea\u30a2\u30eb\u30c7\u30fc\u30bf\u306e\u9001\u4fe1\nuart.write(sdata)<\/code><\/pre>\n\n\n\n<p>\u77ed\u3044\u30b3\u30fc\u30c9\u3067\u3059\u304c\u3001\u3053\u308c\u3067microSD\u30ab\u30fc\u30c9\u306b\u4fdd\u5b58\u3055\u308c\u305f\u97f3\u58f0\u30c7\u30fc\u30bf\u304c\u4e00\u66f2\u518d\u751f\u3055\u308c\u307e\u3059\u3002<\/p>\n\n\n\n<\/div><h2>\u6280\u8853\u89e3\u8aac<\/h2><div class=\"inner\">\n\n\n\n<ul><li>0x7E\uff1a\u958b\u59cb\u30b3\u30fc\u30c9<\/li><li>0xFF\uff1a\u30d0\u30fc\u30b8\u30e7\u30f3\u60c5\u5831<\/li><li>0x06\uff1a\u30d0\u30a4\u30c8\u6570\uff08\u958b\u59cb\u30b3\u30fc\u30c9\u30fb\u7d42\u4e86\u30b3\u30fc\u30c9\u3092\u9664\u304f\uff09<\/li><li>0x01\uff1a\u30b3\u30de\u30f3\u30c9<\/li><li>0x00\uff1a\u30d5\u30a3\u30fc\u30c9\u30d0\u30c3\u30af\u306e\u6709\u7121<\/li><li>0x00\uff1a\u4e0a\u4f4d\u30d3\u30c3\u30c8<\/li><li>0x00\uff1a\u4e0b\u4f4d\u30d3\u30c3\u30c8<\/li><li>0xEF\uff1a\u7d42\u4e86\u30b3\u30fc\u30c9<\/li><\/ul>\n\n\n\n<p>\u57fa\u672c\u52d5\u4f5c\u3092\u300c\u30b3\u30de\u30f3\u30c9\u300d\u3067\u8a2d\u5b9a\u3002<\/p>\n\n\n\n<p>\u52d5\u4f5c\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u300c\u4e0b\u4f4d\u30d3\u30c3\u30c8\u300d\u3067\u6307\u5b9a\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u3053\u306e\uff12\u3064\u4ee5\u5916\u306e\u30d1\u30e9\u30e1\u30fc\u30bf\u30fc\u306f\u57fa\u672c\u7684\u306b\u5171\u901a\u3067\u3059\u3002<\/p>\n\n\n\n<h3>\u66f2\u3092\u6307\u5b9a\u3057\u3066\u518d\u751f<\/h3>\n\n\n\n<ul><li>\u30b3\u30de\u30f3\u30c9\uff1a0x03\uff08\u30c0\u30a4\u30ec\u30af\u30c8\u518d\u751f\u30b3\u30de\u30f3\u30c9\uff09<\/li><li>\u4e0b\u4f4d\u30d3\u30c3\u30c8\uff1a0x03\uff08\u66f2\u306e\u756a\u53f7\u3092\u6307\u5b9a\uff09<\/li><\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>sdata = bytearray(&#91;0x7E,0xFF,0x06,0x03,0x00,0x00,0x03,0xEF])<\/code><\/pre>\n\n\n\n<h3>\u30ea\u30d4\u30fc\u30c8\u518d\u751f<\/h3>\n\n\n\n<ul><li>\u30b3\u30de\u30f3\u30c9\uff1a0x11\uff08\u30ea\u30d4\u30fc\u30c8\u518d\u751f\u30b3\u30de\u30f3\u30c9\uff09<\/li><li>\u4e0b\u4f4d\u30d3\u30c3\u30c8\uff1a0x01\uff08\u30ea\u30d4\u30fc\u30c8\u518d\u751f\u30b9\u30bf\u30fc\u30c8\uff09<\/li><\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>sdata = bytearray(&#91;0x7E,0xFF,0x06,0x11,0x00,0x00,0x01,0xEF])<\/code><\/pre>\n\n\n\n<h3>\u30ea\u30d4\u30fc\u30c8\u518d\u751f\u3092\u6b62\u3081\u308b<\/h3>\n\n\n\n<ul><li>\u30b3\u30de\u30f3\u30c9\uff1a0x11\uff08\u30ea\u30d4\u30fc\u30c8\u518d\u751f\u30b3\u30de\u30f3\u30c9\uff09<\/li><li>\u4e0b\u4f4d\u30d3\u30c3\u30c8\uff1a0x00\uff08\u30ea\u30d4\u30fc\u30c8\u518d\u751f\u30b9\u30c8\u30c3\u30d7\uff09<\/li><\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>sdata = bytearray(&#91;0x7E,0xFF,0x06,0x11,0x00,0x00,0x00,0xEF])<\/code><\/pre>\n\n\n\n<h3>\u305d\u306e\u4ed6<\/h3>\n\n\n\n<p>\u305d\u306e\u4ed6\u3001\u30dc\u30ea\u30e5\u30fc\u30e0\u8abf\u6574\u30fb\u97f3\u8cea\u5909\u66f4\u30fb\u4e00\u6642\u505c\u6b62\u30fb\u30e9\u30f3\u30c0\u30e0\u518d\u751f\u306a\u3069\u3001\u8272\u3005\u306a\u30b3\u30de\u30f3\u30c9\u304c\u7528\u610f\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u8a73\u3057\u304f\u306f\u3001<a href=\"https:\/\/picaxe.com\/docs\/spe033.pdf\">PDF<\/a>\u3092\u3054\u89a7\u304f\u3060\u3055\u3044\u3002<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>3\u30da\u30fc\u30b8\u76ee\u306e\u300c3.2 .Serial Communication Commands\u300d\u3068\u3044\u3046\u9805\u76ee\u306b\u3001\u30b3\u30de\u30f3\u30c9\u306e\u30d1\u30e9\u30e1\u30fc\u30bf\u30fc\u306b\u3064\u3044\u3066\u8a18\u8f09\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>MP3\u518d\u751f\u30e2\u30b8\u30e5\u30fc\u30eb \u300eDFPlayer mini\u300f\u306f\u3001\u5358\u4f53\u3067\u3082\u4f7f\u7528\u53ef\u80fd\u3067\u3059\u304c\u3001\u30de\u30a4\u30b3\u30f3\u3092\u4f7f\u3063\u305fUART\uff08\u975e\u540c\u671f\u30b7\u30ea\u30a2\u30eb\u901a\u4fe1\uff09\u3067\u5236\u5fa1\u3059\u308b\u3053\u3068\u3082\u53ef\u80fd\u3067\u3059\u3002 \u4eca\u56de\u306f\u3001Raspberry Pi Pico\u3092\u4f7f\u3044\u3001DFPlayer [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":2209,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[57],"tags":[44,51],"_links":{"self":[{"href":"https:\/\/www.ekit-tech.com\/index.php?rest_route=\/wp\/v2\/posts\/2198"}],"collection":[{"href":"https:\/\/www.ekit-tech.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ekit-tech.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ekit-tech.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ekit-tech.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2198"}],"version-history":[{"count":24,"href":"https:\/\/www.ekit-tech.com\/index.php?rest_route=\/wp\/v2\/posts\/2198\/revisions"}],"predecessor-version":[{"id":2228,"href":"https:\/\/www.ekit-tech.com\/index.php?rest_route=\/wp\/v2\/posts\/2198\/revisions\/2228"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.ekit-tech.com\/index.php?rest_route=\/wp\/v2\/media\/2209"}],"wp:attachment":[{"href":"https:\/\/www.ekit-tech.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2198"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ekit-tech.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2198"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ekit-tech.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2198"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}