Introduction: Arduino Knight Rider (With LED Bargraph )

Picture of Arduino Knight Rider (With LED Bargraph )

Hello Everybody,

I have always wanted to make a knight rider circuit, but every tutorial I have read uses TONS and TONS of components. So I made a knight rider circuit that uses 3 components and a bit of programming.

PS. Could you please vote for me in the Tech contest.

Step 1: Parts and Components

For this project you don't need too many components. The components you need are:

1- A Arduino UNO

2- A LED Bargraph

3- A Computer with Arduino IDE

4- And a A to B USB cable

Step 2: Schematic

Picture of Schematic

Step 3: Bargraph Assembly

Picture of Bargraph Assembly

Take the jumper wire and wrap it around all the Ground pins which are on the BLANK side of the bargraph.

Step 4: Assembly Part 2

Picture of Assembly Part 2

Put the LED Bargraph on the Arduino Board, and plug the end of the jumper wire in the GND pin as shown.

Step 5: 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 pin11 = 11; int timer = 60;

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); pinMode(pin11, 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(pin11, HIGH); delay(timer); digitalWrite(pin11, 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); }

Step 6: Finish!

If you have any problems, leave a comment .

Enjoy :)

Comments

carlos66ba (author)2014-09-15

You should include current limiting resistors in series with your diodes. Omitting them will work for a while but increases your chances of frying the microcontroller.

KasunN (author)carlos66ba2015-08-19

Nope. It doesn't happen. I tried on MEGA with & without resistors for a couple of minutes thus it worked with no issues. Seemed the board adjusted things itself..

Genius 470 (author)carlos66ba2014-09-16

Thanks for the tip. I will do it in My next instructable.

zuhairmohammed made it! (author)2017-10-15

it's work finaly ,thank you for that

KasunN made it! (author)2015-08-19

Cool project plus saved more time. I tried lots and lots of Knight Rider projects using various ICs, but most often sucks although they consist of lot of components. This is the first to succeed.

turbiny (author)2015-07-21

i wanna make this into my brake light, it uses cars 12v supply and i`m thinking about high power leds can the arduino take all 6/7 leds?

ibenkos (author)2014-10-18

Smart idea! Thanks for shearig :)

Genius 470 (author)ibenkos2014-10-20

Thanks

Arman5592 (author)2014-09-16

There is a knight rider on arduino.cc which uses just leds .

Genius 470 (author)Arman55922014-09-16

I tried to make an easy and low component Knight rider That would fit perfectly on the Arduino, so I used a LED Bargraph instead of LEDs.

mojemdadi (author)2014-09-15

how did you fit the bar graph on the arduino?

Genius 470 (author)mojemdadi2014-09-15

My pin headers where not soldered straight, so it was easy to fit the bargraph on it.

mojemdadi (author)2014-09-15

cool!!!

About This Instructable

7,162views

27favorites

License:

More by Genius 470:Hidden FolderArduino Knight Rider (With LED Bargraph )
Add instructable to: