Introduction: Knight Rider LEDs Show

About: I am an Electric Electronic Engineer student and freelancer . I want to share staff what i build with you.

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

Let's look steps...

Step 1: PARTS

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

Step 2: SCHEMA

Step 3: CODE

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>

Step 4: THANKS FOR VIEWING