. Arduino LED Blinking Project ~ SmartElectronicsDIY

Arduino LED Blinking Project

Introduction

Arduino is a beginner-friendly microcontroller platform, perfect for learning electronics and programming. In this tutorial, we will make a simple LED blinking project. This is usually the first project for anyone starting with Arduino.

This project will teach you:

  • How to use Arduino IDE

  • How to connect LEDs

  • How to write a simple Arduino program


Components Required

  • Arduino UNO Board

  • LED (any color)

  • 220 Ω Resistor

  • Breadboard

  • Jumper Wires


Circuit Diagram

Connect the LED as follows:

  • Long leg (Anode) → Digital Pin 13

  • Short leg (Cathode) → Resistor → GND

(You can insert a circuit diagram image here if available)


Arduino Code

// Arduino LED Blinking Example void setup() { pinMode(13, OUTPUT); // Set pin 13 as OUTPUT } void loop() { digitalWrite(13, HIGH); // LED ON delay(1000); // Wait 1 second digitalWrite(13, LOW); // LED OFF delay(1000); // Wait 1 second }

Explanation:

  1. pinMode(13, OUTPUT) → Sets pin 13 as output.

  2. digitalWrite(13, HIGH) → Turns the LED on.

  3. delay(1000) → Waits for 1 second.

  4. Loop repeats indefinitely.


Project Output

Once you upload the code to Arduino:

  • The LED will blink on and off every second.

  • You can change the delay value to make it faster or slower.


Conclusion

This project is a perfect start for beginners. After mastering LED blinking, you can move to ESP32 projects, IoT applications, and home automation.


0 comments:

Post a Comment