{"id":1462,"date":"2021-02-18T21:05:31","date_gmt":"2021-02-18T20:05:31","guid":{"rendered":"http:\/\/hobbykeller.spdns.de\/?p=1462"},"modified":"2021-02-19T12:15:22","modified_gmt":"2021-02-19T11:15:22","slug":"pinout-for-wemos-d1-mini-pro-china-clone","status":"publish","type":"post","link":"https:\/\/hobbykeller.spdns.de\/?p=1462","title":{"rendered":"Pinout for Wemos D1 Mini Pro China Clone"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">I recently bought a Chinese clone of the Lolin Wemos D1 Mini Pro ESP8266 device from the FEIYANG store at AliExpress. As I had problems running Wifi when setting the original <code>Lolin Wemos D1 Mini Pro<\/code> in the board manager, I resorted to <code>General ESP8266<\/code>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The downside is that the <code>General ESP8266<\/code> board definition offers fewer pin defines. While constants like <code>LED_BUILTIN<\/code> work out of the box, using the common constant <code>D4<\/code> for that very same pin fails with the compiler complaining that an undefined constant has been used.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Therefore we have to define the pins ourselves in the code. Here&#8217;s a table that I found on the <a rel=\"noreferrer noopener\" href=\"https:\/\/chewett.co.uk\/\" data-type=\"URL\" data-id=\"https:\/\/chewett.co.uk\/\" target=\"_blank\">Chris Chewett&#8217;s blog<\/a>. <\/p>\n\n\n\n<figure class=\"wp-block-table is-style-stripes\"><table><tbody><tr><td><strong>Wemos Labels<\/strong><\/td><td><strong>Arduino IDE<\/strong><\/td><td><strong>Remarks<\/strong><\/td><\/tr><tr><td>D0<\/td><td>16<\/td><td><\/td><\/tr><tr><td>D1<\/td><td>5<\/td><td>Usually driving pin for relay shield.<\/td><\/tr><tr><td>D2<\/td><td>4<\/td><td><\/td><\/tr><tr><td>D3<\/td><td>0<\/td><td><\/td><\/tr><tr><td>D4<\/td><td>2<\/td><td><code>LED_BUILTIN<\/code> works as constant,<br>Note that onboard LED will light up when pin is <code>LOW<\/code> and is dark when pin is <code>HIGH<\/code>.<\/td><\/tr><tr><td>D5<\/td><td>14<\/td><td><\/td><\/tr><tr><td>D6<\/td><td>12<\/td><td><\/td><\/tr><tr><td>D7<\/td><td>13<\/td><td><\/td><\/tr><tr><td>D8<\/td><td>15<\/td><td><\/td><\/tr><tr><td>TX<\/td><td>1<\/td><td><\/td><\/tr><tr><td>RX<\/td><td>3<\/td><td><\/td><\/tr><tr><td>A0<\/td><td>17<\/td><td><code>A0<\/code> seems to work as a constant. No need to set pinMode to anything according to this code example.<\/td><\/tr><\/tbody><\/table><figcaption>Translation between the pin numbering on the WeMos D1 mini board and pin numbers in the Arduino IDE<\/figcaption><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>I recently bought a Chinese clone of the Lolin Wemos D1 Mini Pro ESP8266 device from the FEIYANG store at AliExpress. As I had problems running Wifi when setting the<span class=\"more-button\"><a href=\"https:\/\/hobbykeller.spdns.de\/?p=1462\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\">Pinout for Wemos D1 Mini Pro China Clone<\/span><\/a><\/span><\/p>\n","protected":false},"author":2,"featured_media":1464,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[310,64],"tags":[305,308,309,306,311,307],"class_list":["post-1462","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-iot","category-linux","tag-arduino","tag-d1-mini","tag-esp8266","tag-iot","tag-pinout","tag-wemos"],"_links":{"self":[{"href":"https:\/\/hobbykeller.spdns.de\/index.php?rest_route=\/wp\/v2\/posts\/1462","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hobbykeller.spdns.de\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hobbykeller.spdns.de\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hobbykeller.spdns.de\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/hobbykeller.spdns.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1462"}],"version-history":[{"count":7,"href":"https:\/\/hobbykeller.spdns.de\/index.php?rest_route=\/wp\/v2\/posts\/1462\/revisions"}],"predecessor-version":[{"id":1471,"href":"https:\/\/hobbykeller.spdns.de\/index.php?rest_route=\/wp\/v2\/posts\/1462\/revisions\/1471"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/hobbykeller.spdns.de\/index.php?rest_route=\/wp\/v2\/media\/1464"}],"wp:attachment":[{"href":"https:\/\/hobbykeller.spdns.de\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1462"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hobbykeller.spdns.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1462"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hobbykeller.spdns.de\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1462"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}