Welcome to Hackster!
Hackster is a community dedicated to learning hardware, from beginner to pro. Join us, it's free!
Electorials Electronics
Published

Project 001: Arduino LED Project

A simple beginner Arduino project utilising a little bit of code, 2 LEDs and an Arduino.

BeginnerProtip12 minutes3,930
Project 001: Arduino LED Project

Things used in this project

Hardware components

Arduino UNO
Arduino UNO
You could use any other Arduino board as well. The Keyestudio Uno is used in this example.
×1
Jumper wires (generic)
Jumper wires (generic)
5 Male to Male Jumper Wires.
×5
Resistor 10k ohm
Resistor 10k ohm
×2
LED (generic)
LED (generic)
2 LEDs of any colour.
×2
Breadboard (generic)
Breadboard (generic)
×1
USB-A to B Cable
USB-A to B Cable
Depends on the Arduino.
×1

Software apps and online services

Arduino IDE
Arduino IDE

Story

Read more

Schematics

Circuit Diagram

Schematics

Code

Arduino LED Project Code

C/C++
int ledpin1 = 3;
int ledpin2 = 4;

void setup() {
  digitalWrite(ledpin1, HIGH);
  digitalWrite(ledpin2, HIGH);
  delay(200);
  digitalWrite(ledpin1, LOW);
  digitalWrite(ledpin2, LOW);
  delay(200);
}

void loop() {
  digitalWrite(ledpin1, HIGH);
  delay(100);
  digitalWrite(ledpin2, HIGH);
  digitalWrite(ledpin1, LOW);
  delay(100);
  digitalWrite(ledpin2, LOW);
}
 

Credits

Electorials Electronics
85 projects • 64 followers
I'm an electronic hobbyist interested in anything, from Arduino to drones. I plan to educate people with the content on my website.
Contact

Comments

Please log in or sign up to comment.