Your new topic does not fit any of the above??? Check first. Then post here. Thanks.

Moderator: igrr

User avatar
By Aresby
#42944
roboticboyer wrote:I have attached the pin diagrams of the WeMos D1 version R1 and R2 .
The two boards are not pin to pin compatible

My understanding is that only the R2 version has the pins Dx named as NodeMCU v0.9 kit

Very useful pin diagram which I've saved as I will undoubtedly get the two boards mixed up in the future!
User avatar
By David Reid
#64118 Hi there I have a WEMOS D1 from Banggood as well, and just hooked it up to find that the 'blink' example won't work properly unless I swap the 'BUILTIN_LED' toggling to LOW in order to get the builtin LED turned on, vs HIGH which seems more logical .. I'm running Arduino IDE 1.8.1 on a Mac.
User avatar
By Aresby
#64142 Yes, quite so. It's been a long time since I posted that query here but the explanation is quite simple. Unlike the Arduino, the D1 (and other ESP8266 boards) will SINK current (to ground) rather than SOURCE current to flow through an LED (for example) to ground.

So you have to supply the current from a 5v source (say), via the device you are powering, and then let the ESP8266 switch the other side of the device to ground.

I don't like that arrangement because there must be a (very small) resistance between the pin and ground so that side of the device might not be truly grounded - a few millivolts potential difference might exist between the device "GND" and the real GND.

But, despite my reservations it works OK if you can remember what the D1 is doing. Try it with another LED connected to one of the pins (look underneath the board to get the real GPIO pin number) and then connect the anode (long lead) to +5v via a 180 ohm resistor. It works as it should.

I occasionally mention this in my YouTube videos as it's easy to forget (https://www.youtube.com/c/RalphBacon)