loading
hey guys this is my first arduino project  plz  comment how u feel.       

Step 1: Things U Need

As this is easy project for beginner's so parts are also simple 
Parts:
1- Arduino uno or any other board will work
1-Beardboard
9- jumper wires or wires will also do 
8 -leds any color u like i used 3 red, 3 green and 2 blue
8- 1k resistors

Step 2: Placing the Leds and Wiring

In this step u have to place the leds on the bread board i have kept the positive  wire on the right side . 
Next wire them as shown in 

Step 3: Uploading the Code

//LED Pin Variables
int ledPins[] = {2,3,4,5,6,7,8,9}; //An array to hold the pin each LED is connected to
                                   //i.e. LED #0 is connected to pin 2, LED #1, 3 and so on
                                   //to address an array use ledPins[0] this would equal 2
                                   //and ledPins[7] would equal 9

/*
* setup() - this function runs once when you turn your Arduino on
* We the three control pins to outputs
*/
void setup()
{
 
  //Set each pin connected to an LED to output mode (pulling high (on) or low (off)
  for(int i = 0; i < 8; i++){         //this is a loop and will repeat eight times
      pinMode(ledPins[i],OUTPUT); //we use this to set each LED pin to output
  }                                   //the code this replaces is below

 


/*
* loop() - this function will start after setup finishes and then repeat
* we call a function called oneAfterAnother(). if you would like a different behaviour
* uncomment (delete the two slashes) one of the other lines
*/
void loop()                     // run over and over again
{
  oneAfterAnotherNoLoop();   //this will turn on each LED one by one then turn each off
 
}


void oneAfterAnotherNoLoop(){
  int delayTime = 100; //the time (in milliseconds) to pause between LEDs
                       //make smaller for quicker switching and larger for slower
  digitalWrite(ledPins[0], HIGH);  //Turns on LED #0 (connected to pin 2 )
  delay(delayTime);                //waits delayTime milliseconds
  digitalWrite(ledPins[1], HIGH);  //Turns on LED #1 (connected to pin 3 )
  delay(delayTime);                //waits delayTime milliseconds
  digitalWrite(ledPins[2], HIGH);  //Turns on LED #2 (connected to pin 4 )
  delay(delayTime);                //waits delayTime milliseconds
  digitalWrite(ledPins[3], HIGH);  //Turns on LED #3 (connected to pin 5 )
  delay(delayTime);                //waits delayTime milliseconds
  digitalWrite(ledPins[4], HIGH);  //Turns on LED #4 (connected to pin 6 )
  delay(delayTime);                //waits delayTime milliseconds
  digitalWrite(ledPins[5], HIGH);  //Turns on LED #5 (connected to pin 7 )
  delay(delayTime);                //waits delayTime milliseconds
  digitalWrite(ledPins[6], HIGH);  //Turns on LED #6 (connected to pin 8 )
  delay(delayTime);                //waits delayTime milliseconds
  digitalWrite(ledPins[7], HIGH);  //Turns on LED #7 (connected to pin 9 )
  delay(delayTime);                //waits delayTime milliseconds 

//Turns Each LED Off
  digitalWrite(ledPins[7], LOW);  //Turns on LED #0 (connected to pin 2 )
  delay(delayTime);                //waits delayTime milliseconds
  digitalWrite(ledPins[6], LOW);  //Turns on LED #1 (connected to pin 3 )
  delay(delayTime);                //waits delayTime milliseconds
  digitalWrite(ledPins[5], LOW);  //Turns on LED #2 (connected to pin 4 )
  delay(delayTime);                //waits delayTime milliseconds
  digitalWrite(ledPins[4], LOW);  //Turns on LED #3 (connected to pin 5 )
  delay(delayTime);                //waits delayTime milliseconds
  digitalWrite(ledPins[3], LOW);  //Turns on LED #4 (connected to pin 6 )
  delay(delayTime);                //waits delayTime milliseconds
  digitalWrite(ledPins[2], LOW);  //Turns on LED #5 (connected to pin 7 )
  delay(delayTime);                //waits delayTime milliseconds
  digitalWrite(ledPins[1], LOW);  //Turns on LED #6 (connected to pin 8 )
  delay(delayTime);                //waits delayTime milliseconds
  digitalWrite(ledPins[0], LOW);  //Turns on LED #7 (connected to pin 9 )
  delay(delayTime);                //waits delayTime milliseconds 
}


void oneAfterAnotherLoop(){
  int delayTime = 100; //the time (in milliseconds) to pause between LEDs
                       //make smaller for quicker switching and larger for slower

//Turn Each LED on one after another
  for(int i = 0; i <= 7; i++){
    digitalWrite(ledPins[i], HIGH);  //Turns on LED #i each time this runs i
    delay(delayTime);                //gets one added to it so this will repeat
  }                                  //8 times the first time i will = 0 the final
                                     //time i will equal 7;

//Turn Each LED off one after another
  for(int i = 7; i >= 0; i--){  //same as above but rather than starting at 0 and counting up
                                //we start at seven and count down
    digitalWrite(ledPins[i], LOW);  //Turns off LED #i each time this runs i
    delay(delayTime);                //gets one subtracted from it so this will repeat
  }                                  //8 times the first time i will = 7 the final
                                     //time it will equal 0
                                    
                                    
}

/*
* oneOnAtATime() - Will light one LED then the next turning off all the others
*/
void oneOnAtATime(){
  int delayTime = 100; //the time (in milliseconds) to pause between LEDs
                       //make smaller for quicker switching and larger for slower
 
  for(int i = 0; i <= 7; i++){
    int offLED = i - 1;  //Calculate which LED was turned on last time through
    if(i == 0) {         //for i = 1 to 7 this is i minus 1 (i.e. if i = 2 we will
      offLED = 7;        //turn on LED 2 and off LED 1)
    }                    //however if i = 0 we don't want to turn of led -1 (doesn't exist)
                         //instead we turn off LED 7, (looping around)
    digitalWrite(ledPins[i], HIGH);     //turn on LED #i
    digitalWrite(ledPins[offLED], LOW); //turn off the LED we turned on last time
    delay(delayTime);
  }
}

/*
* inAndOut() - This will turn on the two middle LEDs then the next two out
* making an in and out look
*/
void inAndOut(){
  int delayTime = 100; //the time (in milliseconds) to pause between LEDs
                       //make smaller for quicker switching and larger for slower
 
  //runs the LEDs out from the middle
  for(int i = 0; i <= 3; i++){
    int offLED = i - 1;  //Calculate which LED was turned on last time through
    if(i == 0) {         //for i = 1 to 7 this is i minus 1 (i.e. if i = 2 we will
      offLED = 3;        //turn on LED 2 and off LED 1)
    }                    //however if i = 0 we don't want to turn of led -1 (doesn't exist)
                         //instead we turn off LED 7, (looping around)
    int onLED1 = 3 - i;       //this is the first LED to go on ie. LED #3 when i = 0 and LED
                             //#0 when i = 3
    int onLED2 = 4 + i;       //this is the first LED to go on ie. LED #4 when i = 0 and LED
                             //#7 when i = 3
    int offLED1 = 3 - offLED; //turns off the LED we turned on last time
    int offLED2 = 4 + offLED; //turns off the LED we turned on last time
   
    digitalWrite(ledPins[onLED1], HIGH);
    digitalWrite(ledPins[onLED2], HIGH);   
    digitalWrite(ledPins[offLED1], LOW);   
    digitalWrite(ledPins[offLED2], LOW);       
    delay(delayTime);
  }

  //runs the LEDs into the middle
  for(int i = 3; i >= 0; i--){
    int offLED = i + 1;  //Calculate which LED was turned on last time through
    if(i == 3) {         //for i = 1 to 7 this is i minus 1 (i.e. if i = 2 we will
      offLED = 0;        //turn on LED 2 and off LED 1)
    }                    //however if i = 0 we don't want to turn of led -1 (doesn't exist)
                         //instead we turn off LED 7, (looping around)
    int onLED1 = 3 - i;       //this is the first LED to go on ie. LED #3 when i = 0 and LED
                             //#0 when i = 3
    int onLED2 = 4 + i;       //this is the first LED to go on ie. LED #4 when i = 0 and LED
                             //#7 when i = 3
    int offLED1 = 3 - offLED; //turns off the LED we turned on last time
    int offLED2 = 4 + offLED; //turns off the LED we turned on last time
   
    digitalWrite(ledPins[onLED1], HIGH);
    digitalWrite(ledPins[onLED2], HIGH);   
    digitalWrite(ledPins[offLED1], LOW);   
    digitalWrite(ledPins[offLED2], LOW);       
    delay(delayTime);
  }
}
<p>If you are going to put something out for people to try, then your instructions need to be more specific. The pictures are blurry and you don't really explain how to connect the LEDs, resistors, and wires. The code is also giving me 5 errors, I tried the code that maewert put out for the binary name and his worked. Not trying to put you down, but the steps aren't that great to follow.</p>
And how to control more than 11 LEDs on arduino?
This is pretty awesome, I was going to use the code you inserted to make a project. It is a little led dome that changes color. I am using my ardunio for the first time. I'll post it soon with my fingers crossed that it works.
I am very happy that my projects are helping people,send me your project's photos when it is done
How would you make them spell a name in Binary code?
Try this:<br> <br> /*<br> &nbsp; SpellMyName<br> &nbsp; Turns on 8 LEDs to spell my name in Binary<br> */<br> <br> // Pins 2-9 have my 8 LEDs connected to spell my name<br> int led[8] = {2,3,4,5,6,7,8,9};<br> <br> // MyNameLength holds the length of my name in characters<br> #define MyNameLength 4<br> char name[MyNameLength]= {'M','a','r','k'};<br> <br> // the setup routine runs once when you press reset:<br> void setup()<br> {&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br> &nbsp; // initialize the digital pin as an output.<br> &nbsp; int i;<br> &nbsp; for (i=0;i&lt;8;i++)<br> &nbsp; {<br> &nbsp;&nbsp;&nbsp; pinMode(led[i], OUTPUT);&nbsp;&nbsp;&nbsp;&nbsp;<br> &nbsp; }<br> }<br> <br> /*<br> &nbsp; LightUp routine lights up the 8 LEDs to spell out in binary the letter passed in<br> */<br> void LightUp(char letter)<br> {<br> &nbsp; int i;<br> &nbsp; for (i=0;i&lt;8;i++)<br> &nbsp; {<br> &nbsp;&nbsp;&nbsp; // lets check the bit to see if it is on or off<br> &nbsp;&nbsp;&nbsp; if ((letter&amp;(1&lt;&lt;i))!=0)<br> &nbsp;&nbsp;&nbsp; {<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; digitalWrite(led[i],HIGH);<br> &nbsp;&nbsp;&nbsp; }<br> &nbsp;&nbsp;&nbsp; else<br> &nbsp;&nbsp;&nbsp; {<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; digitalWrite(led[i],LOW);<br> &nbsp;&nbsp;&nbsp; }<br> &nbsp; }<br> }<br> <br> // the loop routine runs over and over again forever:<br> void loop()<br> {<br> &nbsp; int i;<br> &nbsp;<br> &nbsp; for (i=0;i&lt;MyNameLength;i++)<br> &nbsp; {<br> &nbsp;&nbsp;&nbsp; LightUp(name[i]);<br> &nbsp;&nbsp;&nbsp; delay(1000);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // wait for a second<br> &nbsp; }<br> }
i hav never tried to spell a name and also you will need a led matrix

About This Instructable

33,334views

15favorites

License:

Bio: I was 13 when I made this account so please don't make fun of my username
More by Pranavthegreat:How To Make A Dark Sensor How to program attiny using arduino uno control your servo using a 555 timer!!!!!!!!!!!!!!!!!!!!!!!!!! 
Add instructable to: