LED chaser using arduino


Materials:-


Diagram:-

Connections:-

LED to arduino

  • LED ( - )  = Arduino GND
  • LED 1= Arduino digital pin 8  
  • LED 2= Arduino digital pin 9 
  • LED 3= Arduino digital pin 10
  • LED 4= Arduino digital pin 11
  • LED 5= Arduino digital pin 12
  • LED 6= Arduino digital pin 13
Code:-

int delayTime=100; void setup() { pinMode(7,OUTPUT); pinMode(8, OUTPUT); pinMode(9, OUTPUT); pinMode(10, OUTPUT); pinMode(11, OUTPUT); pinMode(12, OUTPUT); pinMode(13,OUTPUT); } void loop() //this means Perform functions again and again { digitalWrite(7, HIGH); delay(50); digitalWrite(7, LOW); delay(50); digitalWrite(8, HIGH); delay(50); digitalWrite(8, LOW); delay(50); digitalWrite(9, HIGH); delay(50); digitalWrite(9, LOW); delay(50); digitalWrite(10, HIGH); delay(50); digitalWrite(10, LOW); delay(50); digitalWrite(11, HIGH); delay(50); digitalWrite(11, LOW); delay(50); digitalWrite(12, HIGH); delay(50); digitalWrite(12, LOW); delay(50); digitalWrite(13, HIGH); delay(50); digitalWrite(13, LOW); delay(50); digitalWrite(7, LOW); delay(50); digitalWrite(7, HIGH); delay(50); digitalWrite(8, LOW); delay(50); digitalWrite(8, HIGH); delay(50); digitalWrite(9, LOW); delay(50); digitalWrite(9, HIGH); delay(50); digitalWrite(10, LOW); delay(50); digitalWrite(10, HIGH); delay(50); digitalWrite(11, LOW); delay(50); digitalWrite(11, HIGH); delay(50); digitalWrite(12, LOW); delay(50); digitalWrite(12, HIGH); delay(50); digitalWrite(13, LOW); delay(50); digitalWrite(13, HIGH); delay(50); }