Blink

There is no interfacing here since we are using Built In LED.

void setup() {
    pinMode(LED_BUILTIN, OUTPUT);
}
void loop() {
    digitalWrite(LED_BUILTIN, HIGH);
    delay(1000);
    digitalWrite(LED_BUILTIN, LOW);
    delay(1000);

This is a simple Arduino sketch that blinks the built-in LED on and off. 

This code is also available on Pastebin: https://pastebin.com/5zrbYEY9

Code explanation:

  1. void setup() is the setup function that runs only once when the Arduino board is powered on or reset.

  2. pinMode(LED_BUILTIN, OUTPUT) sets the built-in LED pin as an output pin.

  3. void loop() is the loop function that runs repeatedly after the setup function has finished.

  4. digitalWrite(LED_BUILTIN, HIGH) turns the built-in LED on.

  5. delay(1000) waits for 1000 milliseconds (1 second) before executing the next line of code.

  6. digitalWrite(LED_BUILTIN, LOW) turns the built-in LED off.

  7. delay(1000) waits for another 1000 milliseconds before repeating the loop and turning the LED on again.

This results in the built-in LED turning on for 1 second, turning off for 1 second, and repeating this cycle indefinitely.

Blink-LED