Guiye Perez Bongiovanni
Published © GPL3+

Christmas CyberTree USB Arduino

Built with recycled elements, high brightness color LEDs and an RGB LED.

BeginnerShowcase (no instructions)2,339
Christmas CyberTree USB Arduino

Things used in this project

Hardware components

Arduino UNO
Arduino UNO
×1
High Brightness LED, Color
×8
LED, RGB
LED, RGB
×1
Aluminum dissipator
×3
Hard disk reading head
×1
Glass Ball
×2
Male/Female Jumper Wires
Male/Female Jumper Wires
×1
Breadboard (generic)
Breadboard (generic)
×1
5V Power bank
×1

Story

Read more

Schematics

conexion_PhRgaXx5kW.png

Code

Christmas_CyberTree.ino

Arduino
/*
  Parpadeo de 8 LEDs
  Secuencias de parpadeos de 8 LEDs + LED RGB
 */


//Declaracion de los pines como constantes:
const int LEDr=9; //Color rojo pin 9
const int LEDb=10; //Color azul pin 10
const int LEDg=11; //Color verde pin 11
//Declaracin de las variables necesarias:

int rojo=0;
int verde=0;
int azul=0;

int rled = 2;         // Pin digital al que conectamos el LED rojo
int yled = 3;         // Pin digital al que conectamos el LED amarillo
int bled = 4;         // Pin digital al que conectamos el LED azul
int wled = 5;         // Pin digital al que conectamos el LED blanco
int b2led = 6;        // Pin digital al que conectamos el LED azul 2
int y2led = 7;        // Pin digital al que conectamos el LED amarillo 2
int r2led = 8;        // Pin digital al que conectamos el LED rojo 2
int wl = 12;          // Pin digital al que conectamos el LED blanco 2

void setup() {               
  pinMode(rled, OUTPUT);    // Configracin del pin 2 como salida
  pinMode(yled, OUTPUT);    // Configracin del pin 3 como salida
  pinMode(bled, OUTPUT);    // Configracin del pin 4 como salida
  pinMode(wled, OUTPUT);    // Configracin del pin 5 como salida
  pinMode(b2led, OUTPUT);   // Configracin del pin 6 como salida
  pinMode(y2led, OUTPUT);   // Configracin del pin 7 como salida
  pinMode(r2led, OUTPUT);   // Configracin del pin 8 como salida
  pinMode(wl, OUTPUT);   // Configracin del pin 12 como salida

  setColor(0,255,255);
  delay(50);
  setColor(255,0,255);
  delay(50);
  setColor(255,255,0);
  delay(50);

  //Comprobacion todos los colores
  setColor(255,255,255);
  delay(50);
  setColor(0,0,0);
  delay(50);
  setColor(255,255,255);
  delay(50);
  //Dejamos el color rojo para empezar el loop
  setColor(255,0,255);
  delay(10);
  }

void loop() 

{ 
  digitalWrite(wl, HIGH);  
  delay(5);  
  digitalWrite(wl, LOW);  
  delay(100); 
    digitalWrite(wl, HIGH);  
  delay(5);  
  digitalWrite(wl, LOW);  
  delay(100); 
    digitalWrite(wl, HIGH);  
  delay(5);  
  digitalWrite(wl, LOW);  
  delay(100); 
  
  //Se mantiene el rojo al maximo mientras sube el verde
  for (int verde=255;verde>=0;verde--){
    setColor(0,verde,255);
    delay(1);
    } 
  //Se mantiene el verde al maximo mientras baja el rojo
  for (int rojo=0;rojo<=255;rojo++){
    setColor(rojo,0,255);
    delay(1);
    }
  //Se mantiene el verde al maximo mientras sube el azul
  for (int azul=255;azul>=0;azul--){
    setColor(255,0,azul);
    delay(1);
    }
  //Se mantiene el azul al maximo mientras baja el verde
  for (int verde=0;verde<=255;verde++){
    setColor(255,verde,0);
    delay(1);
    }
  
  //Se mantiene el rojo al maximo mientras baja el azul
  for (int azul=0;azul<=255;azul++){
    setColor(0,255,azul);
    if(azul==255){
      delay(1);
      }
    else{ 
      delay(1);
      }
    }
  
/////////////

 digitalWrite(rled, HIGH);  
  delay(20);                
  digitalWrite(yled, HIGH); 
  delay(20);                  
  digitalWrite(bled, HIGH);  
  delay(20);                  
  digitalWrite(wled, HIGH);  
  delay(20);                  
  digitalWrite(b2led, HIGH); 
  delay(20);                   
  digitalWrite(y2led, HIGH);  
  delay(20);                 
  digitalWrite(r2led, HIGH);  
  delay(20);                 

  digitalWrite(rled, LOW);  
  delay(20);                  
  digitalWrite(yled, LOW);  
  delay(20);                
  digitalWrite(bled, LOW); 
  delay(20);               
  digitalWrite(wled, LOW);  
  delay(20);                 
  digitalWrite(b2led, LOW);  
  delay(20);                  
  digitalWrite(y2led, LOW);  
  delay(20);                 
  digitalWrite(r2led, LOW);  
  delay(20);                  

////destello blanco////

  digitalWrite(wl, HIGH);  
  delay(5);  
  digitalWrite(wl, LOW);  
  delay(100); 
  digitalWrite(wl, HIGH);  
  delay(5);  
  digitalWrite(wl, LOW);  
  delay(100); 
  digitalWrite(wl, HIGH);  
  delay(5);  
  digitalWrite(wl, LOW);  
  delay(100); 
  
/////////////

//Se mantiene el rojo al maximo mientras sube el verde
  for (int verde=255;verde>=0;verde--){
    setColor(0,verde,255);
    delay(1);
    } 

    //////

 digitalWrite(rled, HIGH); 
  delay(10);                  
  digitalWrite(rled, LOW); 
  delay(10);                  
  
  digitalWrite(yled, HIGH);  
  delay(10);                 
  digitalWrite(yled, LOW);  
  delay(10);                 
  
  digitalWrite(bled, HIGH);  
  delay(10);                  
  digitalWrite(bled, LOW);  
  delay(10);                  
  
  digitalWrite(wled, HIGH); 
  delay(10);                  
  digitalWrite(wled, LOW); 
  delay(10);                  
  
  digitalWrite(b2led, HIGH);  
  delay(10);                  
  digitalWrite(b2led, LOW);  
  delay(10);                  
  
  digitalWrite(y2led, HIGH);  
  delay(10);                  
  digitalWrite(y2led, LOW);  
  delay(10);                  
  
  digitalWrite(r2led, HIGH);  
  delay(10);                  
  digitalWrite(r2led, LOW); 
  delay(10);  

  ///destello blanco///
  digitalWrite(wl, HIGH);  
  delay(5);  
  digitalWrite(wl, LOW);  
  delay(100); 
  digitalWrite(wl, HIGH);  
  delay(5);  
  digitalWrite(wl, LOW);  
  delay(100); 
  digitalWrite(wl, HIGH);  
  delay(5);  
  digitalWrite(wl, LOW);  
  delay(100); 
  
  /////

  digitalWrite(rled, HIGH); 
  delay(10);                  
  digitalWrite(rled, LOW); 
  delay(10);                  
  
  digitalWrite(yled, HIGH);  
  delay(10);                 
  digitalWrite(yled, LOW);  
  delay(10);                 
  
  digitalWrite(bled, HIGH);  
  delay(10);                  
  digitalWrite(bled, LOW);  
  delay(10);                  
  
  digitalWrite(wled, HIGH); 
  delay(10);                  
  digitalWrite(wled, LOW); 
  delay(10);                  
  
  digitalWrite(b2led, HIGH);  
  delay(10);                  
  digitalWrite(b2led, LOW);  
  delay(10);                  
  
  digitalWrite(y2led, HIGH);  
  delay(10);                  
  digitalWrite(y2led, LOW);  
  delay(10);                  
  
  digitalWrite(r2led, HIGH);  
  delay(10);                  
  digitalWrite(r2led, LOW); 
  delay(10);  
  
  ///destello blanco///
  digitalWrite(wl, HIGH);  
  delay(5);  
  digitalWrite(wl, LOW);  
  delay(100); 
  digitalWrite(wl, HIGH);  
  delay(5);  
  digitalWrite(wl, LOW);  
  delay(100); 
  digitalWrite(wl, HIGH);  
  delay(5);  
  digitalWrite(wl, LOW);  
  delay(100);
  
  /////

  //Se mantiene el verde al maximo mientras baja el rojo
  for (int rojo=0;rojo<=255;rojo++){
    setColor(rojo,0,255);
    delay(1);
    }

      //Se mantiene el verde al maximo mientras sube el azul
  for (int azul=255;azul>=0;azul--){
    setColor(255,0,azul);
    delay(1);
    
    }

      //Se mantiene el azul al maximo mientras baja el verde
  for (int verde=0;verde<=255;verde++){
    setColor(255,verde,0);
    delay(1);
    }
  
  //Se mantiene el rojo al maximo mientras baja el azul
  for (int azul=0;azul<=255;azul++){
    setColor(0,255,azul);
    if(azul==255){
      delay(1);
      }
    else{ 
      delay(1);
      }
    }

/////////////

  digitalWrite(rled, HIGH);  
  delay(30);                
  digitalWrite(yled, HIGH); 
  delay(30);                  
  digitalWrite(bled, HIGH);  
  delay(30);                  
  digitalWrite(wled, HIGH);  
  delay(30);                  
  digitalWrite(b2led, HIGH); 
  delay(30);                   
  digitalWrite(y2led, HIGH);  
  delay(30);                 
  digitalWrite(r2led, HIGH);  
  delay(30);    

  digitalWrite(wl, HIGH);  
  delay(30); 
//
  digitalWrite(rled, LOW);  
  delay(30);                  
  digitalWrite(yled, LOW);  
  delay(30);                
  digitalWrite(bled, LOW); 
  delay(30);               
  digitalWrite(wled, LOW);  
  delay(30);                 
  digitalWrite(b2led, LOW);  
  delay(30);                  
  digitalWrite(y2led, LOW);  
  delay(30);                 
  digitalWrite(r2led, LOW);  
  delay(30);  

  digitalWrite(wl, LOW);  
  delay(30);

////

  //Se mantiene el rojo al maximo mientras sube el verde
  for (int verde=255;verde>=0;verde--){
    setColor(0,verde,255);
    delay(1);
    } 
  
  //Se mantiene el rojo al maximo mientras sube el verde
  for (int verde=30;verde>=0;verde--){
    setColor(0,verde,30);
    delay(1);
    } 

    //////
  
    digitalWrite(rled, HIGH); 
  delay(30);                  
  digitalWrite(rled, LOW); 
  delay(30);                  
  
  digitalWrite(yled, HIGH);  
  delay(30);                 
  digitalWrite(yled, LOW);  
  delay(30);                 
  
  digitalWrite(bled, HIGH);  
  delay(30);                  
  digitalWrite(bled, LOW);  
  delay(30);                  
  
  digitalWrite(wled, HIGH); 
  delay(30);                  
  digitalWrite(wled, LOW); 
  delay(30);                  
  
  digitalWrite(b2led, HIGH);  
  delay(30);                  
  digitalWrite(b2led, LOW);  
  delay(30);                  
  
  digitalWrite(y2led, HIGH);  
  delay(30);                  
  digitalWrite(y2led, LOW);  
  delay(30);                  
  
  digitalWrite(r2led, HIGH);  
  delay(30);                  
  digitalWrite(r2led, LOW); 
  delay(30);                  

  ///destello blanco///
  digitalWrite(wl, HIGH);  
  delay(5);  
  digitalWrite(wl, LOW);  
  delay(100); 
  digitalWrite(wl, HIGH);  
  delay(5);  
  digitalWrite(wl, LOW);  
  delay(100); 
  digitalWrite(wl, HIGH);  
  delay(5);  
  digitalWrite(wl, LOW);  
  delay(100); 
  /////

    //Se mantiene el azul al maximo mientras baja el verde
  for (int verde=0;verde<=255;verde++){
    setColor(255,verde,0);
    delay(1);
    }
  
  //Se mantiene el rojo al maximo mientras baja el azul
  for (int azul=0;azul<=255;azul++){
    setColor(0,255,azul);
    if(azul==255){
      delay(1);
      }
    else{ 
      delay(1);
      }
    }

    ////
 
  digitalWrite(rled, HIGH); 
  delay(60);                  
  digitalWrite(rled, LOW); 
  delay(30);                  
  
  digitalWrite(yled, HIGH);  
  delay(60);                 
  digitalWrite(yled, LOW);  
  delay(30);                 
  
  digitalWrite(bled, HIGH);  
  delay(60);                  
  digitalWrite(bled, LOW);  
  delay(30);                  
  
  digitalWrite(wled, HIGH); 
  delay(60);                  
  digitalWrite(wled, LOW); 
  delay(30);                  
  
  digitalWrite(b2led, HIGH);  
  delay(60);                  
  digitalWrite(b2led, LOW);  
  delay(30);                  
  
  digitalWrite(y2led, HIGH);  
  delay(60);                  
  digitalWrite(y2led, LOW);  
  delay(30);                  
  
  digitalWrite(r2led, HIGH);  
  delay(60);                  
  digitalWrite(r2led, LOW); 
  delay(30); 

    ///destello blanco///
  digitalWrite(wl, HIGH);  
  delay(5);  
  digitalWrite(wl, LOW);  
  delay(100); 
  digitalWrite(wl, HIGH);  
  delay(5);  
  digitalWrite(wl, LOW);  
  delay(100); 
  digitalWrite(wl, HIGH);  
  delay(5);  
  digitalWrite(wl, LOW);  
  delay(100); 
  /////

 //Se mantiene el azul al maximo mientras baja el verde
  for (int verde=0;verde<=50;verde++){
    setColor(50,verde,0);
    delay(1);
    }
  
  //Se mantiene el rojo al maximo mientras baja el azul
  for (int azul=0;azul<=55;azul++){
    setColor(0,55,azul);
    if(azul==55){
      delay(1);
      }
    else{ 
      delay(1);
      }
    }

/////////////

  digitalWrite(rled, HIGH); 
  delay(50);                  
  digitalWrite(rled, LOW); 
  delay(50);                  
  
  digitalWrite(yled, HIGH);  
  delay(50);                 
  digitalWrite(yled, LOW);  
  delay(50);                 
  
  digitalWrite(bled, HIGH);  
  delay(50);                  
  digitalWrite(bled, LOW);  
  delay(50);                  
  
  digitalWrite(wled, HIGH); 
  delay(50);                  
  digitalWrite(wled, LOW); 
  delay(50);                  
  
  digitalWrite(b2led, HIGH);  
  delay(50);                  
  digitalWrite(b2led, LOW);  
  delay(50);                  
  
  digitalWrite(y2led, HIGH);  
  delay(50);                  
  digitalWrite(y2led, LOW);  
  delay(50);                  
  
  digitalWrite(r2led, HIGH);  
  delay(50);                  
  digitalWrite(r2led, LOW); 
  delay(50);               

//////////

    ///destello blanco///
  digitalWrite(wl, HIGH);  
  delay(5);  
  digitalWrite(wl, LOW);  
  delay(100); 
  digitalWrite(wl, HIGH);  
  delay(5);  
  digitalWrite(wl, LOW);  
  delay(100); 
  digitalWrite(wl, HIGH);  
  delay(5);  
  digitalWrite(wl, LOW);  
  delay(100); 
   
/////////////

  digitalWrite(rled, HIGH);  
  delay(100);                 
  
  digitalWrite(r2led, HIGH); 
  delay(100); 
 
  digitalWrite(yled, HIGH); 
  delay(100);                 

  digitalWrite(y2led, HIGH);  
  delay(100);                 
  
  digitalWrite(bled, HIGH);  
  delay(100);                 
 
  digitalWrite(b2led, HIGH); 
  delay(100);                   
  
  digitalWrite(wled, HIGH);  
  delay(100);                  
 

  digitalWrite(rled, LOW);  
  delay(50);                 

  digitalWrite(r2led, LOW);  
  delay(50);    

  digitalWrite(yled, LOW);  
  delay(70);                  

  digitalWrite(y2led, LOW);  
  delay(70);  

  digitalWrite(bled, LOW);  
  delay(100);                
  
  digitalWrite(b2led, LOW); 
  delay(150);                

  digitalWrite(wled, LOW);  
  delay(200);

///////////////////////////

  digitalWrite(rled, HIGH);  
  digitalWrite(r2led, HIGH); 
  delay(200); 
 
  digitalWrite(yled, HIGH); 
  digitalWrite(y2led, HIGH);  
  delay(200);                 
  
  digitalWrite(bled, HIGH);  
  digitalWrite(b2led, HIGH); 
  delay(200);                   
  
  digitalWrite(wled, HIGH);  
  delay(200);                  
 
  digitalWrite(rled, LOW);  
  digitalWrite(r2led, LOW);  
  delay(300);    

  digitalWrite(yled, LOW);  
  digitalWrite(y2led, LOW);  
  delay(300);  

  digitalWrite(bled, LOW);  
  digitalWrite(b2led, LOW); 
  delay(300);                

  digitalWrite(wled, LOW);  
  delay(300);   

///////

//Se mantiene el azul al maximo mientras baja el verde
  for (int verde=0;verde<=0;verde++){
    setColor(0,verde,0);
    delay(1);
    }
  
  //Se mantiene el rojo al maximo mientras baja el azul
  for (int azul=0;azul<=5;azul++){
    setColor(0,10,azul);
    if(azul==0){
      delay(1);
      }
    else{ 
      delay(1);
      }
    }

    //////

  digitalWrite(wl, HIGH);  
  delay(50);  
  digitalWrite(wl, LOW);  
  delay(50); 
  digitalWrite(wl, HIGH);  
  delay(50);  
  digitalWrite(wl, LOW);  
  delay(50); 
  digitalWrite(wl, HIGH);  
  delay(50);  
  digitalWrite(wl, LOW);  
  delay(50); 

  digitalWrite(wled, HIGH);  
  delay(50);  
  digitalWrite(wled, LOW);  
  delay(50);  
  digitalWrite(wled, HIGH);  
  delay(50);  
  digitalWrite(wled, LOW);  
  delay(50);  
  digitalWrite(wled, HIGH);  
  delay(50);  
  digitalWrite(wled, LOW);  
  delay(50);  

  digitalWrite(wl, HIGH);  
  delay(50);  
  digitalWrite(wl, LOW);  
  delay(50); 
  digitalWrite(wl, HIGH);  
  delay(50);  
  digitalWrite(wl, LOW);  
  delay(50); 
  digitalWrite(wl, HIGH);  
  delay(50);  
  digitalWrite(wl, LOW);  
  delay(50); 

  digitalWrite(wled, HIGH);  
  delay(50);  
  digitalWrite(wled, LOW);  
  delay(50);  
  digitalWrite(wled, HIGH);  
  delay(50);  
  digitalWrite(wled, LOW);  
  delay(50);  
  digitalWrite(wled, HIGH);  
  delay(50);  
  digitalWrite(wled, LOW);  
  delay(50);  

//

  digitalWrite(wl, HIGH);  
  delay(50);  
  digitalWrite(wl, LOW);  
  delay(50); 
  digitalWrite(wled, HIGH);  
  delay(50);  
  digitalWrite(wled, LOW);  
  delay(50); 

  digitalWrite(wl, HIGH);  
  delay(50);  
  digitalWrite(wl, LOW);  
  delay(50); 
  digitalWrite(wled, HIGH);  
  delay(50);  
  digitalWrite(wled, LOW);  
  delay(50); 
  
  digitalWrite(wl, HIGH);  
  delay(50);  
  digitalWrite(wl, LOW);  
  delay(50); 
  digitalWrite(wled, HIGH);  
  delay(50);  
  digitalWrite(wled, LOW);  
  delay(50); 

  digitalWrite(wl, HIGH);  
  delay(50);  
  digitalWrite(wl, LOW);  
  delay(50); 
  digitalWrite(wled, HIGH);  
  delay(50);  
  digitalWrite(wled, LOW);  
  delay(50); 

  digitalWrite(wl, HIGH);  
  delay(50);  
  digitalWrite(wl, LOW);  
  delay(50); 
  digitalWrite(wled, HIGH);  
  delay(50);  
  digitalWrite(wled, LOW);  
  delay(50); 
  
  digitalWrite(wl, HIGH);  
  delay(50);  
  digitalWrite(wl, LOW);  
  delay(50); 
  digitalWrite(wled, HIGH);  
  delay(50);  
  digitalWrite(wled, LOW);  
  delay(50); 

///////////////////////////
                  
 //Se mantiene el rojo al maximo mientras baja el azul
  for (int azul=0;azul<=255;azul++){
    setColor(0,255,azul);
    if(azul==255){
      delay(1);
      }
      }

///////////////////////////

  ///raya/////////////////
 
  digitalWrite(wled, HIGH);   
  digitalWrite(yled, HIGH);  
  digitalWrite(y2led, HIGH);
  digitalWrite(bled, HIGH);   
  digitalWrite(b2led, HIGH);  
  digitalWrite(rled, HIGH);
  digitalWrite(r2led, HIGH);   
  delay(500); 
  
  digitalWrite(wled, LOW);   
  digitalWrite(yled, LOW);  
  digitalWrite(y2led, LOW);
  digitalWrite(bled, LOW);   
  digitalWrite(b2led, LOW);  
  digitalWrite(rled, LOW);
  digitalWrite(r2led, LOW);   
  delay(200);         

  digitalWrite(wled, HIGH);   
  digitalWrite(yled, HIGH);  
  digitalWrite(y2led, HIGH);
  digitalWrite(bled, HIGH);   
  digitalWrite(b2led, HIGH);  
  digitalWrite(rled, HIGH);
  digitalWrite(r2led, HIGH);   
  delay(500); 
  
  digitalWrite(wled, LOW);   
  digitalWrite(yled, LOW);  
  digitalWrite(y2led, LOW);
  digitalWrite(bled, LOW);   
  digitalWrite(b2led, LOW);  
  digitalWrite(rled, LOW);
  digitalWrite(r2led, LOW);   
  delay(200);   

////punto//////////////////

  digitalWrite(wled, HIGH);   
  digitalWrite(yled, HIGH);  
  digitalWrite(y2led, HIGH);
  digitalWrite(bled, HIGH);   
  digitalWrite(b2led, HIGH);  
  digitalWrite(rled, HIGH);
  digitalWrite(r2led, HIGH);   
  delay(70); 
  
  digitalWrite(wled, LOW);   
  digitalWrite(yled, LOW);  
  digitalWrite(y2led, LOW);
  digitalWrite(bled, LOW);   
  digitalWrite(b2led, LOW);  
  digitalWrite(rled, LOW);
  digitalWrite(r2led, LOW);   
  delay(200);   

  digitalWrite(wled, HIGH);   
  digitalWrite(yled, HIGH);  
  digitalWrite(y2led, HIGH);
  digitalWrite(bled, HIGH);   
  digitalWrite(b2led, HIGH);  
  digitalWrite(rled, HIGH);
  digitalWrite(r2led, HIGH);   
  delay(70); 
  
  digitalWrite(wled, LOW);   
  digitalWrite(yled, LOW);  
  digitalWrite(y2led, LOW);
  digitalWrite(bled, LOW);   
  digitalWrite(b2led, LOW);  
  digitalWrite(rled, LOW);
  digitalWrite(r2led, LOW);   
  delay(200); 

////////////////////////////

  digitalWrite(rled, HIGH); 
  delay(70);                 
  digitalWrite(yled, HIGH);  
  delay(65);                 
  digitalWrite(bled, HIGH); 
  delay(60);                 
  digitalWrite(wled, HIGH);  
  delay(55);                 
  digitalWrite(y2led, HIGH); 
  delay(50);                  
  digitalWrite(b2led, HIGH);  
  delay(45);                 
  digitalWrite(r2led, HIGH);  
  delay(40);     

  digitalWrite(wl, HIGH);  
  delay(100);    

  digitalWrite(rled, LOW);  
  delay(40);                  
  digitalWrite(yled, LOW);  
  delay(45);                
  digitalWrite(bled, LOW);  
  delay(50);                 
  digitalWrite(wled, LOW);  
  delay(55);                 
  digitalWrite(b2led, LOW);  
  delay(60);                
  digitalWrite(y2led, LOW); 
  delay(65);                 
  digitalWrite(r2led, LOW);  
  delay(70);

  digitalWrite(wl, LOW);  
  delay(100);  
  
 ///////////////////////////

 digitalWrite(rled, HIGH); 
  delay(70);                 
  digitalWrite(yled, HIGH);  
  delay(65);                 
  digitalWrite(bled, HIGH); 
  delay(60);                 
  digitalWrite(wled, HIGH);  
  delay(55);                 
  digitalWrite(y2led, HIGH); 
  delay(50);                  
  digitalWrite(b2led, HIGH);  
  delay(45);                 
  digitalWrite(r2led, HIGH);  
  delay(40);     

  digitalWrite(wl, HIGH);  
  delay(100);    

  digitalWrite(rled, LOW);  
  delay(40);                  
  digitalWrite(yled, LOW);  
  delay(45);                
  digitalWrite(bled, LOW);  
  delay(50);                 
  digitalWrite(wled, LOW);  
  delay(55);                 
  digitalWrite(b2led, LOW);  
  delay(60);                
  digitalWrite(y2led, LOW); 
  delay(65);                 
  digitalWrite(r2led, LOW);  
  delay(70);

  digitalWrite(wl, LOW);  
  delay(100);  
  
///////////////////////////

  digitalWrite(rled, HIGH); 
  delay(30);                 
  digitalWrite(yled, HIGH);  
  delay(25);                 
  digitalWrite(bled, HIGH); 
  delay(20);                 
  digitalWrite(wled, HIGH);  
  delay(15);                 
  digitalWrite(y2led, HIGH); 
  delay(10);                  
  digitalWrite(b2led, HIGH);  
  delay(5);                 
  digitalWrite(r2led, HIGH);  
  delay(1);                  

  digitalWrite(rled, LOW);  
  delay(1);                  
  digitalWrite(yled, LOW);  
  delay(5);                
  digitalWrite(bled, LOW);  
  delay(10);                 
  digitalWrite(wled, LOW);  
  delay(15);                 
  digitalWrite(b2led, LOW);  
  delay(20);                
  digitalWrite(y2led, LOW); 
  delay(25);                 
  digitalWrite(r2led, LOW);  
  delay(30);                 
}
///////////////////////////

void setColor(int red,int green,int blue)
{
  analogWrite(LEDr,red);
  analogWrite(LEDg,green);
  analogWrite(LEDb,blue); 
}

////FELIZ///NAVIDAD////////
    

Credits

Guiye Perez Bongiovanni

Guiye Perez Bongiovanni

0 projects • 18 followers
Artist / Maker

Comments