Arduino Circular Cylon!

11,618

47

23

Posted

Introduction: Arduino Circular Cylon!

This is a quick arduino project that is great for beginners. Enjoy! There is a video on the last step!

Step 1: What You Need


To build this project you will need:

10 LEDs, any color will do.

Some wire, I used a ribbon cable I had

Most importantly, an Arduino

Perhaps some electrical tape

Prototyping board

Step 2: Build It!


Start off by arranging your LEDs on the proto board however you choose, I chose to place them in an oval shape.

After that, solder them to the board. After they are soldered, solder all the cathodes (shorter leads, - or the lead that has the flat side) together. Then, solder a wire to each anode (other lead of the LEDs) to a wire.

Step 3: Connect It to the Arduino and Program It!

Wire it up like schematic shows!



After you are done wiring it, you can start programming the arduino. I understand that there are many ways of bumming the code but since this example is for beginners, I made it as simple and understandable as possible.

void setup() {
pinMode(1,OUTPUT);
pinMode(2,OUTPUT);
pinMode(3,OUTPUT);
pinMode(4,OUTPUT);
pinMode(5,OUTPUT);
pinMode(6,OUTPUT);
pinMode(7,OUTPUT);
pinMode(8,OUTPUT);
pinMode(9,OUTPUT);
pinMode(10,OUTPUT);
}
void loop() {
digitalWrite(1,HIGH);
delay(100);
digitalWrite(1,LOW);
digitalWrite(2,HIGH);
delay(100);
digitalWrite(2,LOW);
digitalWrite(3,HIGH);
delay(100);
digitalWrite(3,LOW);
digitalWrite(4,HIGH);
delay(100);
digitalWrite(4,LOW);
digitalWrite(5,HIGH);
delay(100);
digitalWrite(5,LOW);
digitalWrite(6,HIGH);
delay(100);
digitalWrite(6,LOW);
digitalWrite(7,HIGH);
delay(100);
digitalWrite(7,LOW);
digitalWrite(8,HIGH);
delay(100);
digitalWrite(8,LOW);
digitalWrite(9,HIGH);
delay(100);
digitalWrite(9,LOW);
digitalWrite(10,HIGH);
delay(100);
digitalWrite(10,LOW);
}

Step 4: You Are Done!

power up your duino' and watch the lights!





MUST READ! :

The first person to make this project and post some images of it in the comments below will receive 1(one) patch acknowledging your accomplishment! Start Building! OFFER VOID PAST January 15, 2012

Share

Recommendations

  • Epilog Challenge 9

    Epilog Challenge 9
  • Paper Contest 2018

    Paper Contest 2018
  • First Time Author Contest 2018

    First Time Author Contest 2018
user

We have a be nice policy.
Please be positive and constructive.

Tips

Questions

23 Comments

Mine works! Great instructable! It was an easy build but still pretty cool. And I just LOVE building stuff with LEDS! Thanks

I thought you did a great write up was wondering if you could help me with a project relating to the same thing

Great project! I hope the patch is still on. I made this video:
http://www.youtube.com/watch?v=veTh8TyFa_g&feature=channel_video_title
:)

Well, I already gave the patch away, but I love it! I will definitely make an exception!

Thanks you very much,
Cheers!

Cool stuff!

Another way to write the loop would be:

void loop() {
int i = 1;
for (i = 1; i <=10; i++) {
digitalWrite(i,HIGH);
delay(100);
digitalWrite(i,LOW);
}
}

Cheers!

Kind of late reply, I know, but there is a bug in your code. Your output will remain low for about 5 clock cycles. Depending on the speed of your xtal this could be very quick indeed. What you will end up with is the pin going high for 100ms, then going low, then immediately going high again for 100ms. The best you could hope for would be a very slight flicker, probably not discernible. A quick delay(100) after the last digitalWrite(i,LOW); would do the trick. Here is the updated code:

void loop() {
int i = 1;
for (i = 1; i <=10; i++) {
digitalWrite(i,HIGH);
delay(100);
digitalWrite(i,LOW);
delay(100);
}
}

Oh snap! I totally missed that - good call!

Yeah I know about that, but it resets after every loop so it kinda delays after each time it goes around. Thanks!

Could probably do something similar using a cheaper 4017 + 555 combo but pretty nice regardless!