Onboard LED Blinking Light
This example shows the simplest thing you can do with an Arduino board without any additional jumper wire to blink on-board LED.
The on-board LED on most Arduino boards is connected to a digital pin and pin number vary based board type. There is a "LED_BUILTIN" constant specified in every board descriptor file, the value of it is the pin number to which the on-board LED is connected and most boards have this LED connected to digital pin 13. This constant is and allows you to control the built-in LED easily.
// setup function - runs once when user press reset or power the board
void setup() {
// initialize digital pin LED_BUILTIN as an output.
pinMode(LED_BUILTIN, OUTPUT);
}
// loop function runs over and over again
void loop() {
digitalWrite(LED_BUILTIN, HIGH); // turn the LED on
delay(1000); // wait for one second
digitalWrite(LED_BUILTIN, LOW); // turn the LED off
delay(1000); // wait for one second
}