user15569: To use the onboard LED on an Arduino one usually has to know the pin number (13 in most cases), but is there a constant in the Arduino IDE one can use as well? 
So is it possible to use something like int LED = ONBOARDLED; instead of using int LED = 13;?

user4143: Try LED_BUILTIN:
pins_arduino.h:static const uint8_t LED_BUILTIN = 13;


user2881: 
#define LED_BUILTIN 13

(source)

15569: <p>To use the onboard LED on an Arduino one usually has to know the pin number (13 in most cases), but is there a constant in the Arduino IDE one can use as well? </p>

<p>So is it possible to use something like <code>int LED = ONBOARDLED;</code> instead of using <code>int LED = 13;</code>?</p>
 4143: <p>Try <code>LED_BUILTIN</code>:</p>

<pre><code>pins_arduino.h:static const uint8_t LED_BUILTIN = 13;
</code></pre>
 2881: <blockquote>
  <p><code>#define LED_BUILTIN 13</code></p>
</blockquote>

<p>(<a href="https://github.com/arduino/Arduino/blob/435fc323e0ab3b03bc5835e5309b5022bf57388a/hardware/arduino/sam/variants/arduino_due_x/variant.h#L97" rel="nofollow">source</a>)</p>
