Project tutorial
Blinking LEDs with Arduino

Blinking LEDs with Arduino © GPL3+

Blinking LEDs with Arduino and some buttons.

  • 8,314 views
  • 3 comments
  • 22 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

  • 20,764 views
  • 8 comments
  • 65 respects

Turn LEDs On/Off via Remote Control

Project tutorial by ismystore

  • 18,698 views
  • 4 comments
  • 10 respects

Arduino Traffic Light Simulator

Project tutorial by Zachary Haslam

  • 77,563 views
  • 26 comments
  • 100 respects

tinyGlow Smart LEDs

by Alex Glow

  • 8,897 views
  • 3 comments
  • 28 respects

DHT11 Sensor with LEDs and a Piezo Speaker

Project tutorial by PrinceMatthew

  • 23,308 views
  • 4 comments
  • 32 respects

Alexa Controlled LEDs Through Raspberry Pi

Project tutorial by vincent wong

  • 9,912 views
  • 6 comments
  • 30 respects
Add projectSign up / Login