Arduino Knight Rider with 10 LEDs

Knight Rider LED project is one of the best projects for Arduino beginners. This LED project is interesting for people who have watched the Knight Rider tv series. In this tutorial, you can get everything about wiring diagrams and coding.

Related Articles – Blink LED With Arduino Uno

Arduino Uno - Knight Rider With LEDs

Required Components

1 * Arduino Uno Board

21 * Jumper Wires (Male to male)

10 * LED

10 * 220-ohm Resistors

1 * Breadboard

  • You can buy these products from Amazon or Aliexpress for cheap prices.

Video Tutorial For This Project

Here is a video tutorial for this project. You can do your whole project with this video.

Wiring Diagram

  • Connect all LEDs to the breadboard like the wiring diagram below. (Connect All LED cathode pins to Arduino Board GND wire)
  • Connect all 220-ohm resistors to the LEDs anode lead of the LED.
  • Connect LEDs to digital pins as a wiring diagram.
Arduino Uno - Knight Rider With LEDs Diagram

Code

				
					int ledPin1 = 13; 
int ledPin2 = 12;
int ledPin3 = 11;
int ledPin4 = 10;
int ledPin5 = 9;
int ledPin6 = 8;
int ledPin7 = 7;
int ledPin8 = 6; 
int ledPin9 = 5;
int ledPin10 = 4;
const int delayTime = 50; 

 void setup () 
 
{
  pinMode(ledPin1, OUTPUT); 
  pinMode(ledPin2, OUTPUT); 
  pinMode(ledPin3, OUTPUT); 
  pinMode(ledPin4, OUTPUT); 
  pinMode(ledPin5, OUTPUT); 
  pinMode(ledPin6, OUTPUT); 
  pinMode(ledPin7, OUTPUT); 
  pinMode(ledPin8, OUTPUT);
  pinMode(ledPin9, OUTPUT); 
  pinMode(ledPin10, OUTPUT);
} 
 void loop() { 
 
 
 digitalWrite(ledPin1,HIGH);
 delay(delayTime);
 digitalWrite(ledPin1,LOW);
 digitalWrite(ledPin2,HIGH);
 delay(delayTime); 
 digitalWrite(ledPin2,LOW);
 
 digitalWrite(ledPin3,HIGH);
 delay(delayTime);
 digitalWrite(ledPin3,LOW);
 
 digitalWrite(ledPin4,HIGH);
 delay(delayTime);
 digitalWrite(ledPin4,LOW);

 digitalWrite(ledPin5,HIGH);
 delay(delayTime);
 digitalWrite(ledPin5,LOW);
 
 digitalWrite(ledPin6,HIGH);
 delay(delayTime);
 digitalWrite(ledPin6,LOW);
 
 digitalWrite(ledPin7,HIGH);
 delay(delayTime);
 digitalWrite(ledPin7,LOW);
 
 digitalWrite(ledPin8,HIGH);
 delay(delayTime);
 digitalWrite(ledPin8,LOW);

 digitalWrite(ledPin9,HIGH);
 delay(delayTime);
 digitalWrite(ledPin9,LOW);

 digitalWrite(ledPin10,HIGH);
 delay(delayTime);
 digitalWrite(ledPin10,LOW);
 
 
 digitalWrite(ledPin10,HIGH);
 delay(delayTime); 
 digitalWrite(ledPin10,LOW);

 digitalWrite(ledPin9,HIGH);
 delay(delayTime); 
 digitalWrite(ledPin9,LOW);
 
 digitalWrite(ledPin8,HIGH);
 delay(delayTime); 
 digitalWrite(ledPin8,LOW);
 digitalWrite(ledPin7,HIGH);
 delay(delayTime); 
 digitalWrite(ledPin7,LOW);
 
 digitalWrite(ledPin6,HIGH); 
 delay(delayTime); 
 digitalWrite(ledPin6,LOW); 
 
 digitalWrite(ledPin5,HIGH);
 delay(delayTime); 
 digitalWrite(ledPin5,LOW); 
 
 digitalWrite(ledPin4,HIGH); 
 delay(delayTime); 
 digitalWrite(ledPin4,LOW); 
 
 digitalWrite(ledPin3,HIGH); 
 delay(delayTime); 
 digitalWrite(ledPin3,LOW); 
 
 digitalWrite(ledPin2,HIGH); 
 delay(delayTime); 
 digitalWrite(ledPin2,LOW); 
 
 digitalWrite(ledPin1,HIGH);
 delay(delayTime); 
 digitalWrite(ledPin1,LOW); 

 
}
				
			

Feel free to ask any questions about this project in the comment section.
Thank you.

10 Responses

  1. Excellent read, I just passed this onto a friend who was doing some research on that. And he just bought me lunch because I found it for him smile Thus let me rephrase that: Thank you for lunch! “A human being has a natural desire to have more of a good thing than he needs.” by Mark Twain.

  2. Spot on with this write-up, I actually suppose this website wants rather more consideration. I’ll probably be again to read way more, thanks for that info.

  3. Good web site! I truly love how it is simple on my eyes and the data are well written. I am wondering how I could be notified whenever a new post has been made. I have subscribed to your RSS feed which must do the trick! Have a nice day!

  4. I got what you mean , regards for posting.Woh I am pleased to find this website through google. “Success is dependent on effort.” by Sophocles.

  5. Great write-up, I?¦m normal visitor of one?¦s website, maintain up the nice operate, and It’s going to be a regular visitor for a long time.

  6. Took me time to read all the comments, but I truly enjoyed the article. It proved to become Very useful to me and Im certain to all the commenters here It is always great when you can not only be informed, but also entertained Im positive you had fun writing this post.

  7. Write more, thats all I have to say. Literally, it seems as though you relied on the video to make your point. You definitely know what youre talking about, why waste your intelligence on just posting videos to your site when you could be giving us something informative to read?

  8. Thanks for another informative web site. Where else may I am getting that type of information written in such an ideal way? I have a project that I’m simply now working on, and I have been at the glance out for such information.

Leave a Reply

Your email address will not be published.