lunes, 22 de mayo de 2017

coca cola




// c
  digitalWrite(sega, LOW);    // turn the LED off by making the voltage LOW
  digitalWrite(segf, LOW);   // turn the LED on (HIGH is the voltage level
  digitalWrite(sege, LOW);   // turn the LED on (HIGH is the voltage level
  digitalWrite(segd, LOW);
 
  delay(1000);               // wait for a second
 
  digitalWrite(sega, HIGH);   // turn the LED on (HIGH is the voltage level)
  digitalWrite(segf, HIGH);   // turn the LED on (HIGH is the voltage level
  digitalWrite(sege, HIGH);   // turn the LED on (HIGH is the voltage level
  digitalWrite(segd, HIGH);   // turn the LED on (HIGH is the voltage level

 
 delay(100);
 // 0
  digitalWrite(segf, LOW);    // turn the LED off by making the voltage LOW
  digitalWrite(sege, LOW);   // turn the LED on (HIGH is the voltage level
  digitalWrite(sega, LOW);   // turn the LED on (HIGH is the voltage level
  digitalWrite(segb, LOW);
  digitalWrite(segc, LOW);
  digitalWrite(segd, LOW);
  delay(1000);  
 
  digitalWrite(segf, HIGH);   // turn the LED on (HIGH is the voltage level)
  digitalWrite(sege, HIGH);   // turn the LED on (HIGH is the voltage level
  digitalWrite(segg, HIGH);   // turn the LED on (HIGH is the voltage level
  digitalWrite(segb, HIGH);   // turn the LED on (HIGH is the voltage level
  digitalWrite(segc, HIGH);   // turn the LED on (HIGH is the voltage level
  digitalWrite(sega, HIGH);   // turn the LED on (HIGH is the voltage level
  digitalWrite(segd, HIGH);   // turn the LED on (HIGH is the voltage level
 
 delay(100);
// c
  digitalWrite(sega, LOW);    // turn the LED off by making the voltage LOW
  digitalWrite(segf, LOW);   // turn the LED on (HIGH is the voltage level
  digitalWrite(sege, LOW);   // turn the LED on (HIGH is the voltage level
  digitalWrite(segd, LOW);
 
  delay(1000);               // wait for a second
 
  digitalWrite(sega, HIGH);   // turn the LED on (HIGH is the voltage level)
  digitalWrite(segf, HIGH);   // turn the LED on (HIGH is the voltage level
  digitalWrite(sege, HIGH);   // turn the LED on (HIGH is the voltage level
  digitalWrite(segd, HIGH);   // turn the LED on (HIGH is the voltage level

 
 delay(100);
 digitalWrite(segf, LOW);    // turn the LED off by making the voltage LOW
  digitalWrite(sege, LOW);   // turn the LED on (HIGH is the voltage level
  digitalWrite(segg, LOW);   // turn the LED on (HIGH is the voltage level
  digitalWrite(segb, LOW);
  digitalWrite(segc, LOW);
  digitalWrite(sega, LOW);
  delay(1000);               // wait for a second
// c
  digitalWrite(sega, LOW);    // turn the LED off by making the voltage LOW
  digitalWrite(segf, LOW);   // turn the LED on (HIGH is the voltage level
  digitalWrite(sege, LOW);   // turn the LED on (HIGH is the voltage level
  digitalWrite(segd, LOW);
 
  delay(1000);               // wait for a second
 
  digitalWrite(sega, HIGH);   // turn the LED on (HIGH is the voltage level)
  digitalWrite(segf, HIGH);   // turn the LED on (HIGH is the voltage level
  digitalWrite(sege, HIGH);   // turn the LED on (HIGH is the voltage level
  digitalWrite(segd, HIGH);   // turn the LED on (HIGH is the voltage level

   // 0
  digitalWrite(segf, LOW);    // turn the LED off by making the voltage LOW
  digitalWrite(sege, LOW);   // turn the LED on (HIGH is the voltage level
  digitalWrite(sega, LOW);   // turn the LED on (HIGH is the voltage level
  digitalWrite(segb, LOW);
  digitalWrite(segc, LOW);
  digitalWrite(segd, LOW);
  delay(1000);  
 
  digitalWrite(segf, HIGH);   // turn the LED on (HIGH is the voltage level)
  digitalWrite(sege, HIGH);   // turn the LED on (HIGH is the voltage level
  digitalWrite(segg, HIGH);   // turn the LED on (HIGH is the voltage level
  digitalWrite(segb, HIGH);   // turn the LED on (HIGH is the voltage level
  digitalWrite(segc, HIGH);   // turn the LED on (HIGH is the voltage level
  digitalWrite(sega, HIGH);   // turn the LED on (HIGH is the voltage level
  digitalWrite(segd, HIGH);   // turn the LED on (HIGH is the voltage level
 
 delay(100);
// c
  digitalWrite(sega, LOW);    // turn the LED off by making the voltage LOW
  digitalWrite(segf, LOW);   // turn the LED on (HIGH is the voltage level
  digitalWrite(sege, LOW);   // turn the LED on (HIGH is the voltage level
  digitalWrite(segd, LOW);
 
  delay(1000);               // wait for a second
 
  digitalWrite(sega, HIGH);   // turn the LED on (HIGH is the voltage level)
  digitalWrite(segf, HIGH);   // turn the LED on (HIGH is the voltage level
  digitalWrite(sege, HIGH);   // turn the LED on (HIGH is the voltage level
  digitalWrite(segd, HIGH);   // turn the LED on (HIGH is the voltage level

 
 delay(100);
 digitalWrite(segf, LOW);    // turn the LED off by making the voltage LOW
  digitalWrite(sege, LOW);   // turn the LED on (HIGH is the voltage level
  digitalWrite(segg, LOW);   // turn the LED on (HIGH is the voltage level
  digitalWrite(segb, LOW);
  digitalWrite(segc, LOW);
  digitalWrite(sega, LOW);
  delay(1000);               // wait for a second
 // L
    digitalWrite(segf, LOW);
    digitalWrite(sege, LOW);
    digitalWrite(segd, LOW);
 
  delay(1000);
 
  digitalWrite(segf, HIGH);   // turn the LED on (HIGH is the voltage level)
  digitalWrite(sege, HIGH);   // turn the LED on (HIGH is the voltage level
  digitalWrite(segg, HIGH);   // turn the LED on (HIGH is the voltage level
  digitalWrite(segb, HIGH);   // turn the LED on (HIGH is the voltage level
  digitalWrite(segc, HIGH);   // turn the LED on (HIGH is the voltage level
  digitalWrite(sega, HIGH);   // turn the LED on (HIGH is the voltage level
  digitalWrite(segd, HIGH);   // turn the LED on (HIGH is the voltage level

martes, 25 de abril de 2017




//El pin 13 tiene conectado un LED en la mayoria de las tarjetas arduino
// ponle un nombre
int led = 13;
int led2= 12;
int led3= 8;
// la rutina de configuracion corre solo una vez
void setup() {
  // initialize the digital pin as an output.
  pinMode(led, OUTPUT);
}

// la rutina loop se repite una y otra vez
void loop() {
  digitalWrite(led, HIGH);   // enciende el LED (HIGH es el nivel de voltaje)
  delay(1000);               // espera medio segundo
  digitalWrite(led, LOW);    // turn the LED off by making the voltage LOW
  delay(1000);               // wait for a second
  digitalWrite(led2, HIGH);   // enciende el LED (HIGH es el nivel de voltaje)
  delay(1000);               // espera medio segundo
  digitalWrite(led2, LOW);    // turn the LED off by making the voltage LOW
  delay(1000);               // wait for a second
  digitalWrite(led3, HIGH);   // enciende el LED (HIGH es el nivel de voltaje)
  delay(1000);               // espera un segundo
  digitalWrite(led3, LOW);    // turn the LED off by making the voltage LOW
  delay(1000);               // wait for a second
}