Knight Rider Circuit

by kinte ryder in Circuits > Arduino

10436 Views, 513 Favorites, 0 Comments

Knight Rider Circuit

DSC03220.png
Arduino Knight  Rider Circuit

This time its not a big project. Its just a simple circuit that uses a arduino uno, 9 Red LEDs , a Resistor, few jumpers and a breadboard to make the LEDs act like the LED panel in the michael's car.

Things Needed+

DSC03221.JPG
DSC03222.JPG
DSC03223.JPG
DSC03224.JPG

Here the Things Needed for this project.

  1. 9 Red LEDs.
  2. A 220 Ohm Resistor.
  3. Mini Bread board.
  4. Jumpers.
  5. Arduino Uno with the cable.

LEDs + Resistor

DSC03230.JPG
DSC03234.JPG

First of all fix the LEDs and the resistor as shown.

Connections+

ggg.PNG
DSC03226.JPG
DSC03238.JPG

Remember to start from the pins above 1. You can use them but it may occur some problems while uploading to the board. Make sure to carefully observe the circuit diagram.

Programing........

DSC03246.JPG

I am not going to explain far about the code. Simply Its programmed to Turn one led on then wait about 40 milliseconds and then trun on the other one. And It will go again and again.

Heres the code.

int pin2 = 2;
int pin3 = 3; int pin4 = 4; int pin5 = 5; int pin6 = 6; int pin7 = 7; int pin8 = 8; int pin9 = 9; int pin10 = 10; int timer = 40;

void setup(){ pinMode(pin2, OUTPUT); pinMode(pin3, OUTPUT); pinMode(pin4, OUTPUT); pinMode(pin5, OUTPUT); pinMode(pin6, OUTPUT); pinMode(pin7, OUTPUT); pinMode(pin8, OUTPUT); pinMode(pin9, OUTPUT); pinMode(pin10, OUTPUT); }

void loop() { digitalWrite(pin2, HIGH); delay(timer); digitalWrite(pin2, LOW); delay(timer);

digitalWrite(pin3, HIGH); delay(timer); digitalWrite(pin3, LOW); delay(timer);

digitalWrite(pin4, HIGH); delay(timer); digitalWrite(pin4, LOW); delay(timer);

digitalWrite(pin5, HIGH); delay(timer); digitalWrite(pin5, LOW); delay(timer);

digitalWrite(pin6, HIGH); delay(timer); digitalWrite(pin6, LOW); delay(timer);

digitalWrite(pin7, HIGH); delay(timer); digitalWrite(pin7, LOW); delay(timer); digitalWrite(pin8, HIGH); delay(timer); digitalWrite(pin8, LOW); delay(timer);

digitalWrite(pin9, HIGH); delay(timer); digitalWrite(pin9, LOW); delay(timer); digitalWrite(pin10, HIGH); delay(timer); digitalWrite(pin10, LOW); delay(timer); digitalWrite(pin10, HIGH); delay(timer); digitalWrite(pin10, LOW); delay(timer); digitalWrite(pin9, HIGH); delay(timer); digitalWrite(pin9, LOW); delay(timer); digitalWrite(pin8, HIGH); delay(timer); digitalWrite(pin8, LOW); delay(timer); digitalWrite(pin7, HIGH); delay(timer); digitalWrite(pin7, LOW); delay(timer); digitalWrite(pin6, HIGH); delay(timer); digitalWrite(pin6, LOW); delay(timer);

digitalWrite(pin5, HIGH); delay(timer); digitalWrite(pin5, LOW); delay(timer);

digitalWrite(pin4, HIGH); delay(timer); digitalWrite(pin4, LOW); delay(timer);

digitalWrite(pin3, HIGH); delay(timer); digitalWrite(pin3, LOW); delay(timer); }

And Done!

DSC03220.JPG

And we done I wish you a good luck on trying this circuit. And if you like this project please make sure to vote me in the contests in instructables.