Project tutorial
Blinking LEDs with Arduino

Blinking LEDs with Arduino © GPL3+

Blinking LEDs with Arduino and some buttons.

  • 3,195 views
  • 2 comments
  • 16 respects

Components and supplies

Apps and online services

About this project

This project allows you to blink LEDs with a button.

Step 1: Get connected

Connect 3 LEDs like this:

  • LED Short legs + Ground
  • LED Long legs + Resistor
  • Resistor + Pin 2 + 3 + 5
  • Button Power + Resistor
  • Resistor + 5V
  • Button + Pin 6

Step 2: Deploy the app

Open the sample code and deploy it and give a try.

Code

LEDCar.inoArduino
int led1 = 2;
int led2 = 3;
int led3 = 5;
int button = 6;

void setup() {
  pinMode(button,INPUT);
  pinMode(led1,OUTPUT);
  pinMode(led2,OUTPUT);
  pinMode(led3,OUTPUT);
    }

void loop() {
int ButtonStatus = digitalRead(button);
if (ButtonStatus == HIGH)
{
  digitalWrite(led1,HIGH);
  digitalWrite(led2,HIGH);
  digitalWrite(led3,HIGH);
} else {
  digitalWrite(led1,LOW);
  digitalWrite(led2,LOW);
  digitalWrite(led3,LOW);
}
    }

Comments

Similar projects you might like

Blinking LEDs on Arduino from iOS and Android

Project tutorial by Alex Jonsson

  • 13,660 views
  • 8 comments
  • 44 respects

Turn LEDs On/Off via Remote Control

Project tutorial by ismystore

  • 6,927 views
  • 0 comments
  • 5 respects

RFID Identification With LEDs

Project showcase by Tech with Matthew

  • 10,978 views
  • 5 comments
  • 40 respects

Arduino Traffic Light Simulator

Project tutorial by Zachary Haslam

  • 8,023 views
  • 1 comment
  • 20 respects

DHT11 Sensor with LEDs and a Piezo Speaker

Project tutorial by Tech with Matthew

  • 6,167 views
  • 3 comments
  • 19 respects

tinyGlow Smart LEDs

by Alex Glow

  • 3,799 views
  • 3 comments
  • 24 respects
Add projectSign up / Login