Closed Bolukan closed 6 years ago
We never had compile errors while testing in Arduino IDE but you are right.
As you migh have noticed this function is also used in case of the nodemcu and wifinfo that do have D9 and D10
So we will have to split this up.
As for why we have this basterd of a function check [this](https://iotappstory.com/wiki/arduino-esp/library-api-20/api-methods/dpinconv()) wiki page.
Yeah, found the source code of the definition of the pins available for the compiler:
For variant "d1_mini", as the "WeMos D1 R2 & mini", "WeMos D1 mini Lite" and "WeMos D1 mini Pro": https://github.com/esp8266/Arduino/blob/master/variants/d1_mini/pins_arduino.h
and variant "d1" as the "WEMOS D1 R1 (Retired)": https://github.com/esp8266/Arduino/blob/master/variants/d1/pins_arduino.h
(edit: post crossed the above)
Closing as you already Pull requested a solutions.
Compiling on PlatformIO for the WeMos D1 R2 & mini the compiler errors on
Lines 1003-1017 as D9 and D10 are not defined for this board. (but called RX and TX).
Not knowing the function of this code, maybe this is not a good solution, but I propose to consider return 3 and 1 in stead?