Knight Rider LEDs Show

by Azmi Deliaslan in Circuits > Arduino

276 Views, 0 Favorites, 0 Comments

Knight Rider LEDs Show

Knight Driver LEDs Shows

Hey everyone. Today ı will show you how can you KARASİMSEK (Knight Driver) LEDs .

Let's look steps...

PARTS

  • 10*5mm red LEDs
  • Arduino UNO
  • Breadboard
  • Jumper Wires (male to male and male to female)

SCHEMA

fritzing jpg.png

CODE

code.jpg

The code has explanations of code functions. You will easly understand it. If you have a problem , you can contact me.

<p>//satdeliaslan//</p><p>const int ledSeries[]={4,5,6,7,8,9,10,11,12,13};//we just escape from lots of coding so we use array </p><p>void setup() {
  for(int j=0;j<=10;j++){           //set all pins as OUTPUT
  pinMode(ledSeries[j],OUTPUT);
  }
}</p><p>void loop() {
  for(int i=0;i<=10;i++){                              
    digitalWrite(ledSeries[i],HIGH);  //turn on leds one by one
    delay(100);                       //delay 1ms
    digitalWrite(ledSeries[i],LOW);   //turn off leds one by one
  }
  for(int i=10;i>0;i--){
    digitalWrite(ledSeries[i],HIGH);  //same loop just other way
    delay(100);
    digitalWrite(ledSeries[i],LOW);
  }
}</p>

THANKS FOR VIEWING

20190402_201743.jpg