Project tutorial
Blinking LEDs with Arduino

Blinking LEDs with Arduino © GPL3+

Blinking LEDs with Arduino and some buttons.

  • 7,086 views
  • 3 comments
  • 21 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,771 views
  • 8 comments
  • 65 respects

Turn LEDs On/Off via Remote Control

Project tutorial by ismystore

  • 14,640 views
  • 2 comments
  • 9 respects

Arduino Traffic Light Simulator

Project tutorial by Zachary Haslam

  • 91,271 views
  • 32 comments
  • 111 respects

tinyGlow Smart LEDs

by Alex Glow

  • 8,938 views
  • 3 comments
  • 28 respects

DHT11 Sensor with LEDs and a Piezo Speaker

Project tutorial by PrinceMatthew

  • 21,117 views
  • 4 comments
  • 29 respects

Alexa Controlled LEDs Through Raspberry Pi

Project tutorial by vincent wong

  • 10,181 views
  • 6 comments
  • 30 respects
Add projectSign up / Login