LED Blink (Beginner)

 

LED Blink (Beginner)




Objective: Learn the basics of Arduino programming by turning an LED on and off.


  • Components: Arduino board, LED, 220-ohm resistor, breadboard, jumper wires.
  • Steps:
    1. Connect the LED to pin 13 of the Arduino board.
    2. Write a simple code in the Arduino IDE to blink the LED.
    3. Upload the code to your Arduino, and see the LED blink.



Code Sample:

void setup() {

  pinMode(13, OUTPUT);  // Set pin 13 as output

}


void loop() {

  digitalWrite(13, HIGH);  // Turn LED on

  delay(1000);              // Wait for a second

  digitalWrite(13, LOW);   // Turn LED off

  delay(1000);              // Wait for a second

}


Post a Comment

0 Comments