The arduino rider.
The arduino rider.
Okay, so recently I thought of an idea... why not make a knight rider program, and if it works ... make it look good and also make it on a circuit board? So that's what I did. I made a effective program for arduino that will simulate the Cylon/Night Rider lights.
So basically I made a program and a circuit.
uhh... so keep reading!


Step 1: Get the parts.

The arduino rider.
The arduino rider.
The arduino rider.
For this project you will need..- an arduino duemilanove (anything that is roughly the same (size, shape , pin layout, program support, etc.))- the program (you can copy it from the text here, or if my link works)- header connectors, that fit in any breadboard, arduino ,etc. (I got them @ frys)- 5 red leds- at ~3V (I only had white 5mm) -------- Do not get the giant red "super bright" 1cm long leds.They are too big and are less powerful, trust me I have them right here and the white ones in this instructable are much much better, and brighter.- 220 ohm resistor (I used 330 ohm, close enough) ------ Actually 100 ohm ones are the best.- a circuit board or peg board i used Radio Shack Dual PC board 276-148- wire (maybe, i bent the pins of the leds, so I didnt need any)- A computer that can program your arduino (duh!)- Solder + IronOkay so lets build it!
The arduino rider.
Cylon_Machine_ADV_.pde1 KB

Step 2: Make the circut

The arduino rider.
The arduino rider.
Okay because this is a easy project you dont need a breadboard, the circuit is simple. We will start by connecting all 5 led's negative terminals together, and soldering it up (on the board), and connecting a 220 ohm resistor to the negative terminal of the leds, and the other end to the pin to go to ground of the arduino, and then your leds are connecting to pins 12, 11, 10, 9, and 8 (this will all follow my program). This circuit will save your resistors for you instead of using 5 of them.

Make your circuit based on the picture, and if you can similar to mine.

Gee, don't those pictures look alike?
Hmm....

Step 3: PROGRAMMING TIME!

The arduino rider.
Woo! the best part. Okay so you can use any program, including the demo one, BUT... mine has smoother transitions, go ahead be the judge whose do you like better, the sample or mine?Here is my code:int pinled1 = 12; //we are saying "Hey! led 1 is connected to pin 12!"int pinled2 = 11; //and so on...int pinled3 = 10;int pinled4 = 9;int pinled5 = 8;int tim = 50; //feel free to change thisvoid setup() { pinMode(pinled1, OUTPUT);// Now we are saying "Led 1 is going to give out energy , not take it in, it is a OUTPUT." pinMode(pinled2, OUTPUT);// and so on... pinMode(pinled3, OUTPUT); pinMode(pinled4, OUTPUT); pinMode(pinled5, OUTPUT);}void loop() // this stuff will reapeat over and over and over and ... { digitalWrite(pinled1, HIGH); //turns led1 on, or HIGH delay(tim); //wait for tim miliseconds digitalWrite(pinled2, HIGH);//and so on delay(tim); digitalWrite(pinled1, LOW);//turns led1 off, or LOW delay(tim);// you get the point digitalWrite(pinled3, HIGH); delay(tim); digitalWrite(pinled2, LOW); delay(tim); digitalWrite(pinled4, HIGH); delay(tim); digitalWrite(pinled3, LOW); delay(tim); digitalWrite(pinled5, HIGH); delay(tim); digitalWrite(pinled4, LOW); delay(tim); digitalWrite(pinled4, HIGH); delay(tim); digitalWrite(pinled5, LOW); delay(tim); digitalWrite(pinled3, HIGH); delay(tim); digitalWrite(pinled4, LOW); delay(tim); digitalWrite(pinled2, HIGH); delay(tim); digitalWrite(pinled3, LOW); delay(tim); digitalWrite(pinled1, HIGH); delay(tim); digitalWrite(pinled2, LOW); delay(tim);}upload that into your arduino.
The arduino rider.
Cylon_Machine_ADV_.pde1 KB

Step 4: Try it out!

The arduino rider.
So insert your arduino knight rider circuit into your arduino with the program selected, and watch... cool right? So look at my original one that I made...
Okay for those of you that just cant stop making stuff, I have some ideas
- add a sensor to control speed
- pick diffrent speeds/modes with a button (I can do that and the knob)
- make it fancier!
- make the best code that you can that will do the same!

Step 5: See Ya!

The arduino rider.
Okay so I really hoped you like my 2nd Instructable (I will admit my first one really was bad)... Okay so leave comments ( positive ones with out any swears preferred), and I am open to any suggestions, and if you want any improvements, just leave a comment.... So see ya!
The arduino rider.

The arduino rider.

 
 

Tag cloud

make build easy simple arduino making homemade solar laser printed portable cheap mini building custom cardboard wooden create super lego turn paracord chocolate your paper light intel