⚡ YOUR FIRST ARDUINO PROGRAM: BLINK AN LED
If you're just getting started with Arduino, this is one of the best places to begin.
The Arduino Uno already has a built-in LED connected to digital pin 13, so we don't even need a breadboard or external components.
Upload this code:
**********************************************
void setup() {
pinMode(LED_BUILTIN, OUTPUT);
}
void loop() {
digitalWrite(LED_BUILTIN, HIGH);
delay(1000);
digitalWrite(LED_BUILTIN, LOW);
delay(1000);
}
****************************************
That's it! 🔥
The LED will:
💡 Turn ON for 1 second
⚫ Turn OFF for 1 second
🔁 Repeat continuously
But this tiny program teaches several important Arduino concepts:
🔹 setup() — runs once when the Arduino starts
🔹 loop() — repeats continuously
🔹 pinMode() — configures a pin
🔹 digitalWrite() — controls an output
🔹 HIGH / LOW — turns the output ON or OFF
🔹 delay() — pauses the program for a specified time
Try changing:
delay(1000);
to:
delay(200);
What happens? 😁
Experiment with different values and watch how the blink rate changes.
Sometimes the best way to learn electronics is simply to BUILD something and start changing things.
⚡ CircuitWorks Lab
BUILD • TEST • TROUBLESHOOT
1
0 comments
Rob Tabb
1
⚡ YOUR FIRST ARDUINO PROGRAM: BLINK AN LED
powered by
AI CircuitWorks Lab
skool.com/circuitworks-lab-7388
Electronics Engineer with 20+ years building and hacking gadgets . Let’s build something. Let us build, fix and hack electronics . 🔧
Build your own community
Bring people together around your passion and get paid.
Powered by