Introduction: Arduino Cylon Eye

Hello! Today I'm going to show you how to make a Cylon Eye form Battlestar Galactica.

Step 1: Parts

For this project, you will need:

  1. Arduino Uno/Genuino
  2. Red LED (7)
  3. 100 ohm (7)
  4. Jumpers (8)
  5. Breadboard
  6. USB B Cable
  7. Arduino IDE

Here's a video tutorial of this project, if you'd prefer that:

https://www.youtube.com/watch?v=GWT5L6H4GCc&t=24s

Step 2: The Circuit

Here's ho sto assemble the circuit:

  1. Insert your LEDs in to your breadboard. Keep them close together to maintain the cylon effect. Have the anodes at the right and the cathodes to the left.
  2. Place a resistor at the cathodes of every LED.
  3. Place a jumper in digital pins 0-6. Place the other end of that jumper at the anodes of them LEDs.
  4. Place a jumper in the GND pin of the Arduino and connect it to the power bus of the breadboard. Make sure the ground wire is in the same row as the resistors.

That's it for the circuit. Now you need to upload the code and that's it. I hoped you enjoyed this project and, as always, Happy Making!

Step 3: The Code

Before you upload the program, you should definitely read the code notes. This is a pretty basic program and these commands are very useful when writing code for Arduino.

//defines which pin each LED corresponds to

int led_1 = 0;
int led_2 = 1;

int led_3 = 2;

int led_4 = 3;

int led_5 = 4;

int led_6 = 5;

int led_7 = 6;

void setup() {

// set up all the LEDs as OUTPUT

pinMode(led_1, OUTPUT); p

inMode(led_2, OUTPUT);

pinMode(led_3, OUTPUT);

pinMode(led_4, OUTPUT);

pinMode(led_5, OUTPUT);

pinMode(led_6, OUTPUT);

pinMode(led_7, OUTPUT); }

void loop() {

//1 digitalWrite(led_1, HIGH); digitalWrite(led_2, LOW); digitalWrite(led_3, LOW); digitalWrite(led_4, LOW); digitalWrite(led_5, LOW); digitalWrite(led_6, LOW); digitalWrite(led_7, LOW); delay(100);

//2 digitalWrite(led_1, LOW); digitalWrite(led_2, HIGH); digitalWrite(led_3, LOW); digitalWrite(led_4, LOW); digitalWrite(led_5, LOW); digitalWrite(led_6, LOW); digitalWrite(led_7, LOW); delay(100);

//3 digitalWrite(led_1, LOW); digitalWrite(led_2, LOW); digitalWrite(led_3, HIGH); digitalWrite(led_4, LOW); digitalWrite(led_5, LOW); digitalWrite(led_6, LOW); digitalWrite(led_7, LOW); delay(100);

//4 digitalWrite(led_1, LOW); digitalWrite(led_2, LOW); digitalWrite(led_3, LOW); digitalWrite(led_4, HIGH); digitalWrite(led_5, LOW); digitalWrite(led_6, LOW); digitalWrite(led_7, LOW); delay(100);

//5 digitalWrite(led_1, LOW); digitalWrite(led_2, LOW); digitalWrite(led_3, LOW); digitalWrite(led_4, LOW); digitalWrite(led_5, HIGH); digitalWrite(led_6, LOW); digitalWrite(led_7, LOW); delay(100);

//6 digitalWrite(led_1, LOW); digitalWrite(led_2, LOW); digitalWrite(led_3, LOW); digitalWrite(led_4, LOW); digitalWrite(led_5, LOW); digitalWrite(led_6, HIGH); digitalWrite(led_7, LOW); delay(100);

//7 digitalWrite(led_1, LOW); digitalWrite(led_2, LOW); digitalWrite(led_3, LOW); digitalWrite(led_4, LOW); digitalWrite(led_5, LOW); digitalWrite(led_6, LOW); digitalWrite(led_7, HIGH); delay(100);

//6 digitalWrite(led_1, LOW); digitalWrite(led_2, LOW); digitalWrite(led_3, LOW); digitalWrite(led_4, LOW); digitalWrite(led_5, LOW); digitalWrite(led_6, HIGH); digitalWrite(led_7, LOW); delay(100);

//5 digitalWrite(led_1, LOW); digitalWrite(led_2, LOW); digitalWrite(led_3, LOW); digitalWrite(led_4, LOW); digitalWrite(led_5, HIGH); digitalWrite(led_6, LOW); digitalWrite(led_7, LOW); delay(100);

//4 digitalWrite(led_1, LOW); digitalWrite(led_2, LOW); digitalWrite(led_3, LOW); digitalWrite(led_4, HIGH); digitalWrite(led_5, LOW); digitalWrite(led_6, LOW); digitalWrite(led_7, LOW); delay(100);

/3 digitalWrite(led_1, LOW); digitalWrite(led_2, LOW); digitalWrite(led_3, HIGH); digitalWrite(led_4, LOW); digitalWrite(led_5, LOW); digitalWrite(led_6, LOW); digitalWrite(led_7, LOW); delay(100);

//2 digitalWrite(led_1, LOW); digitalWrite(led_2, HIGH); digitalWrite(led_3, LOW); digitalWrite(led_4, LOW); digitalWrite(led_5, LOW); digitalWrite(led_6, LOW); digitalWrite(led_7, LOW); delay(100);

}