How to make a knight rider LED chaser (part i)

Hello friends, welcome back to my blog post. In a previous article, I talked about how to light an LED bulb using Arduino. Also gained some knowledge of coding. Also, this tutorial covers the basics for making Knight Rider LED Chasers. Today I am going to talk about how to make an LED chaser using eight LED bulbs. This project is very easy. We are creating this project using the basic knowledge of Arduino. So we will now learn step by step how to do this project. So let’s go to the post.

OK, let’s do it step by step. The required components are given below.

Disclosure: These Amazon links are Affiliate links. As an Amazon Associate, I earn from qualifying purchases.

Step 1

Firstly, identify these components as you like.

Arduino UNO board

Breadboard

A breadboard is a very important component for testing electronic circuits. Below is how this is connected internally.

LED Bulb

I have used eight LED bulbs for this project.LED means a light-emitting diode. This is a diode. The main feature of these components is that they produce light as the current passes through them. Also, This component is very useful for light decoration.

Resistors

I have used eight resistors for this project. This component is used to control the current. Use these as the current coming through the Arduino board can go through the bulbs and burn out.

Jumper wires

This item is most useful for connecting the Arduino board with other components. There are three types of jumper wires. They are male to male, female to female, and female to male. This project for I used male-to-male jumper wires.

Step 2 

Connect the LED bulbs to your breadboard as shown below.

Step 3

Connect the resistors to the LED bulb anode pins.

Step 4

Connect this circuit to the Arduino board.

I used 2 to 9 digital pins for this project. All cathode pins are connected to the Arduino GND pin.

Step 5

Connect the Arduino board to your computer.

Step 6

So let’s see how to create code for this project.

  • Copy and paste this code into your Arduino IDE.
void setup() {
  //define LED pins
  pinMode(2, OUTPUT);
  pinMode(3, OUTPUT);
  pinMode(4, OUTPUT);
  pinMode(5, OUTPUT);
  pinMode(6, OUTPUT);
  pinMode(7, OUTPUT);
  pinMode(8, OUTPUT);
  pinMode(9, OUTPUT);
}
void loop() {
  digitalWrite(2, HIGH);//1st LED on
  delay(200);//time delay
  digitalWrite(2, LOW);//1st LED off
  delay(200);//time delay


  digitalWrite(3, HIGH);//2nd LED on
  delay(200);//time delay
  digitalWrite(3, LOW);//2nd LED off
  delay(200);//time delay


  digitalWrite(4, HIGH);
  delay(200);
  digitalWrite(4, LOW);
  delay(200);


  digitalWrite(5, HIGH);
  delay(200);
  digitalWrite(5, LOW);
  delay(200);


  digitalWrite(6, HIGH);
  delay(200);
  digitalWrite(6, LOW);
  delay(200);


  digitalWrite(7, HIGH);
  delay(200);
  digitalWrite(7, LOW);
  delay(200);


  digitalWrite(8, HIGH);
  delay(200);
  digitalWrite(8, LOW);
  delay(200);


  digitalWrite(9, HIGH);
  delay(200);
  digitalWrite(9, LOW);
  delay(200);
}

The same code used to blink one bulb is used for this project. The Arduino digital pins used for this project are included in the void setup. I have used 2 to 9 digital pins for this project. The void loop function includes how to blink LEDs one by one. The same code used in the second article is used for this project. Increases LED bulbs only.

Step 7

Now, select the board and port. After, upload this code to the Arduino board.

If all the above steps are done correctly, the project will be successful. So, see you in the next project or tutorial. Have a good day.

Similar Posts

4 Comments

  1. Hello there! I could have sworn I’ve been to this
    blog before but after reading through some of the
    post I realized it’s new to me. Nonetheless, I’m
    definitely happy I found it and I’ll be book-marking and checking back often!

Leave a Reply

Your email address will not be published. Required fields are marked *