lunes, 22 de mayo de 2017

Circuito HOLA

// declaracion de pines
int led = 13;
int sega = 9;
int segb = 10;
int segc = 13;
int segd = 12;
int sege = 11;
int segf = 8;
int segg = 7;
int sefdf = 6;

// the setup routine runs once when you press reset:
void setup() {
  // inicializar como salida.
  pinMode(led, OUTPUT);
  pinMode(sega, OUTPUT);
  pinMode(segb, OUTPUT);
  pinMode(segc, OUTPUT);
  pinMode(segd, OUTPUT);
  pinMode(sege, OUTPUT);
  pinMode(segf, OUTPUT);
  pinMode(segg, OUTPUT);
}

// the loop routine runs over and over again forever:
void loop() {
 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(2000);
 
  // H
  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);
  delay(1000);               // wait for a second
 
  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);
 
   // 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);
 
   // 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
 
 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
 
 delay(100);
  digitalWrite(sege, HIGH);   // turn the LED on (HIGH is the voltage level
  digitalWrite(segf, HIGH);   // turn the LED on (HIGH is the voltage level)
  digitalWrite(segg, HIGH);   // turn the LED on (HIGH is the voltage level)
  digitalWrite(sega, HIGH);   // turn the LED on (HIGH is the voltage level)
 
 
 
}

No hay comentarios:

Publicar un comentario