Introduction: Simple Arduino Project

code :

int led =4;
int led2=8;

int led3=5;
int led4=2; int b=7;

void setup() {

pinMode(led,OUTPUT);

pinMode(led2,OUTPUT);

pinMode(led3,OUTPUT);

pinMode(led4,OUTPUT);

pinMode(b,INPUT);

}

void loop() { if (digitalRead(b)==HIGH){

digitalWrite(led,HIGH);

delay(1000); digitalWrite(led2,HIGH);

delay(1000); digitalWrite(led3,HIGH);

delay(1000); digitalWrite(led4,HIGH);

delay(1000); digitalWrite(led,LOW);

delay(1000); digitalWrite(led2,LOW);

delay(1000); digitalWrite(led3,LOW);

delay(1000); digitalWrite(led4,LOW);

delay(1000); }}

Comments

author
tomatoskins (author)2015-10-12

What does it do?