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:
- Connect the LED to pin 13 of the Arduino board.
- Write a simple code in the Arduino IDE to blink the LED.
- 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
}
0 Comments