user28475: I am using a device with an ESP 8266 microcontroller. I have discovered that setting LED_BUILTIN to HIGH turns the built-in LED off and  setting LED_BUILTIN to LOW turns the built-in LED on. This seems to be because the microcontroller can sink more current than it can source.
Before I start using this microcontroller, I would like to know which other pins have this reverse behaviour. I've looked up datasheets for the ESP 8266 but I don't see how to discern this information. I would simply write a sketch to test, but I'm not sure what I might damage, and I'm not sure how to determine when an output pin is in the high-impedance state anyway.
On the ESP 8266, how to know which pins are HIGH -> 0v and which pins are HIGH -> 5v? Are the HIGH -> 0v pins necessarily LOW -> 5v? Where is this documented?

user37622: The esp8266 must have a pull-up on io 2 for boot configuration. The Wemos D1 boards put the LED in series with the pull-up resistor on io 2. This creates the 'reversed' LED behavior.

The large D1s are retired and it is hard to find a good and readable schematics. The cut out is from D1 mini schematics.

28475: <p>I am using a device with an ESP 8266 microcontroller. I have discovered that setting <code>LED_BUILTIN</code> to <code>HIGH</code> turns the built-in LED <strong>off</strong> and  setting <code>LED_BUILTIN</code> to <code>LOW</code> turns the built-in LED <strong>on</strong>. This seems to be because the <a href="https://github.com/nodemcu/nodemcu-devkit-v1.0/issues/16" rel="nofollow noreferrer">microcontroller can sink more current than it can source</a>.</p>

<p>Before I start using this microcontroller, I would like to know which other pins have this reverse behaviour. I've looked up datasheets for the ESP 8266 but I don't see how to discern this information. I would simply write a sketch to test, but I'm not sure what I might damage, and I'm not sure how to determine when an output pin is in the high-impedance state anyway.</p>

<p><strong>On the ESP 8266, how to know which pins are <code>HIGH -&gt; 0v</code> and which pins are <code>HIGH -&gt; 5v</code>?</strong> Are the <code>HIGH -&gt; 0v</code> pins necessarily <code>LOW -&gt; 5v</code>? Where is this documented?</p>
 37622: <p>The esp8266 must have a pull-up on io 2 for boot configuration. The Wemos D1 boards put the LED in series with the pull-up resistor on io 2. This creates the 'reversed' LED behavior.</p>

<p><a href="https://i.stack.imgur.com/KLDWA.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/KLDWA.png" alt="enter image description here"></a></p>

<p>The large D1s are retired and it is hard to find a good and readable schematics. The cut out is from D1 mini schematics.</p>
