Arduino Knight Rider with 10 LEDs

Arduino Knight Rider with 10 LEDs

Share on facebook
Share on twitter
Share on linkedin
Share on whatsapp
Share on reddit

ajax loader

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.

samsung-galaxy-a12
Phones

Samsung Galaxy A12 Review

ajax loader

Share on facebook Share on twitter Share on linkedin Share on whatsapp Share on reddit Are you looking to buy a Samsung Galaxy A12, or are you just curious? Whichever is the case, you came to the right place. Samsung Galaxy A12 is a budget mobile phone trying to deliver

Read More »
things to consider before buying a phone
Phones

Things to consider before buying a smartphone

ajax loader

Share on facebook Share on twitter Share on linkedin Share on whatsapp Share on reddit These days smartphones have become an essential part of our lives. We need a smartphone to contact people, take photos and videos, play games, browse the internet, and store personal data. Here is why most

Read More »
how to use telegram secret chat
How To

What Is Telegram Secret Chat?

ajax loader

Share on facebook Share on twitter Share on linkedin Share on whatsapp Share on reddit Telegram chats aren’t end-to-end encrypted in default messaging mode. In Telegram, all chat boxes don’t use end-to-end encryption like WhatsApp. But, If you want a fully encrypted method for your chat. Then you can change it

Read More »
multiplayer games for low-end pc
Best Games

Top 15 Free To Play Multiplayer Games For Low-End PC

ajax loader

Share on facebook Share on twitter Share on linkedin Share on whatsapp Share on telegram In this article, we talk about the best free-to-play online multiplayer games for low-end pc. You can get all the pieces of information like system requirements, genre, and gameplay about all these multiplayer video games.

Read More »
Share your love

7 Comments

Leave a Reply

Your email address will not be published.

  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.