Arduino Circular Cylon!


11,808

47

23

Introduction: Arduino Circular Cylon!

I love making things. I always found electronics and stuff like that fun. When I was little I alw...

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

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

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
Hack It! Challenge

Participated in the
Hack It! Challenge

Make It Glow Challenge

Participated in the
Make It Glow Challenge

Pocket-Sized Contest

Participated in the
Pocket-Sized Contest

4th Epilog Challenge

Participated in the
4th Epilog Challenge

Be the First to Share

    Recommendations

    • Magnets Challenge

      Magnets Challenge
    • Raspberry Pi Contest 2020

      Raspberry Pi Contest 2020
    • Wearables Contest

      Wearables Contest

    23 Discussions

    0
    botgames
    botgames

    6 years ago on Introduction

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

    0
    BLias
    BLias

    6 years ago

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

    0
    TobaTobias
    TobaTobias

    8 years ago on Step 4

    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
    :)

    0
    Robot Lover
    Robot Lover

    Reply 8 years ago on Step 4

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

    0
    TobaTobias
    TobaTobias

    Reply 8 years ago on Step 4

    Thanks you very much,
    Cheers!

    0
    asevilla
    asevilla

    8 years ago on Step 3

    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!

    0
    soshimo
    soshimo

    Reply 8 years ago on Introduction

    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);
    }
    }

    0
    asevilla
    asevilla

    Reply 8 years ago on Introduction

    Oh snap! I totally missed that - good call!

    0
    Robot Lover
    Robot Lover

    Reply 8 years ago on Introduction

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

    0
    nexekho
    nexekho

    8 years ago on Introduction

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

    0
    soshimo
    soshimo

    Reply 8 years ago on Introduction

    Ah, but then you would be stuck with a simple 555 timer and a fixed frequency. With an MCU you have MUCH more power over with what and how you drive your lights. Try making the cylon light programmable (or at least changeable in the sequence). Break out the soldering wick because you are going to be changing your circuit. With an MCU, I hook up my usb, burn my sketch (in the case of a 'duino) and I'm done.

    0
    Robot Lover
    Robot Lover

    Reply 8 years ago on Introduction

    Yeah I probably could have but this was mainly a project for beginner arduino users. Thanks for the comment!

    You beat me to it, I was going to write an instructable regarding a circular LED chaser for a costume I'm doing (read attempting to do) I may expand on this using shift registers tho.

    0
    Robot Lover
    Robot Lover

    Reply 8 years ago on Introduction

    Great! I would love to see it! post an ible! Thanks for the comment!

    0
    Dominion-Network
    Dominion-Network

    Reply 8 years ago on Introduction

    I have expanded on this using a shift register IC (74HC595) you can read the ible here.

    0
    soshimo
    soshimo

    Reply 8 years ago on Introduction

    Shift register is a great way to create chaser lights! I've done the same myself. The best part is you can get certain light patterns based on numbers (if you have 8 lights you could think of each as a bit position in a binary number). You can get some really cool chase effects with that. I created a device that allows you to control the sequences from an RS232 port (or USB to RS232 converter). I've used Vixen and created a sequencer plugin for it. All based on that 74HC595!. One thing I ended up doing was add a transistor for each group of eight lights. That acts as a current source so I don't have a current surge nightmare on the 74hc595.

    0
    RocketPenguin

    ok i made it. i didnt solder it on a perferbored because i need the leds someware else...
    anyway

    IMG_0243.jpgIMG_0242.jpg
    0
    Robot Lover
    Robot Lover

    Reply 8 years ago on Introduction

    Cool! I'll send the patch right away! You have a video of it in action?

    0
    nattyclem
    nattyclem

    8 years ago on Introduction

    I love your triangular LEDs could you tell me where you got them.
    Great instructable.