user13355: I have an embarrassingly simple question.
My experience to date has been limited to Arduino Uno + Wifi101.  I bought an ESP8266 and noticed that the GPIO pins don't match the printed numbers on the board.
When programming and defining pins, does #define <pin name> 16 call the pin with the printed designation D0?
I can't find a straight answer to this anywhere.
Image credit: http://crufti.com/content/images/2015/11/nodemcudevkit_v1-0_io.jpg


user20696: Looks like you're using https://github.com/esp8266/Arduino, in which case - yes, 16 is GPIO16, which on the NodeMCU board you have is labeled D0.  
I am not entirely sure why the NodeMCU guys had to do this "pin remapping", but the end result is inconvenience when using the module with anything but their Lua.

user10794: It looks like they are using a similar system to the Arduino pin mappings, for example:

(Image credit: https://www.arduino.cc/en/Hacking/PinMapping168)
There, for example, pin 2 on the chip, is D0 (digital pin 0) on the board.
Their board will use their own mappings, but the concept is the same.

does #define  16 call the pin with the printed designation D0?

That doesn't "call" anything. It would depend on the code. If the code in question addresses the actual chip pins, then it is chip pin 16. If it goes through a library and the library maps the chip pins to the board pins, that it will refer to board pin 16. I notice BTW that the board doesn't have a pin 16.

13355: <p>I have an embarrassingly simple question.</p>

<p>My experience to date has been limited to Arduino Uno + Wifi101.  I bought an ESP8266 and noticed that the GPIO pins don't match the printed numbers on the board.</p>

<p>When programming and defining pins, does <code>#define &lt;pin name&gt; 16</code> call the pin with the printed designation D0?</p>

<p>I can't find a straight answer to this anywhere.</p>

<p>Image credit: <a href="http://crufti.com/content/images/2015/11/nodemcudevkit_v1-0_io.jpg" rel="nofollow noreferrer">http://crufti.com/content/images/2015/11/nodemcudevkit_v1-0_io.jpg</a></p>

<p><a href="https://i.stack.imgur.com/93qIq.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/93qIq.jpg" alt="NodeMCU ESP8266"></a></p>
 20696: <p>Looks like you're using <a href="https://github.com/esp8266/Arduino" rel="nofollow">https://github.com/esp8266/Arduino</a>, in which case - yes, 16 is GPIO16, which on the NodeMCU board you have is labeled D0.  <br>
I am not entirely sure why the NodeMCU guys had to do this "pin remapping", but the end result is inconvenience when using the module with anything but their Lua.</p>
 10794: <p>It looks like they are using a similar system to the Arduino pin mappings, for example:</p>

<p><a href="https://i.stack.imgur.com/W6hdF.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/W6hdF.png" alt="Arduino Uno pin mappings"></a></p>

<p>(Image credit: <a href="https://www.arduino.cc/en/Hacking/PinMapping168" rel="nofollow noreferrer">https://www.arduino.cc/en/Hacking/PinMapping168</a>)</p>

<p>There, for example, pin 2 on the chip, is D0 (digital pin 0) on the board.</p>

<p>Their board will use their own mappings, but the concept is the same.</p>

<blockquote>
  <p>does #define  16 call the pin with the printed designation D0?</p>
</blockquote>

<p>That doesn't "call" anything. It would depend on the code. If the code in question addresses the actual chip pins, then it is chip pin 16. If it goes through a library and the library maps the chip pins to the board pins, that it will refer to board pin 16. I notice BTW that the board doesn't have a pin 16.</p>
