// include the library code:




const int SEGA = 6, SEGB = 5, SEGC =4, SEGD=3, SEGE = 2, SEGF = 1,SEGG = 0;


//initialize the keypad connection.
void write_to_HEX(int a, int b, int c, int d, int e, int f, int g)
{
  digitalWrite(SEGA, a);
  digitalWrite(SEGB, b);
  digitalWrite(SEGC, c);
  digitalWrite(SEGD, d);
  digitalWrite(SEGE, e);
  digitalWrite(SEGF, f);
  digitalWrite(SEGG, g);
}



void setup() {
  pinMode(SEGA, OUTPUT);
  pinMode(SEGB, OUTPUT);
  pinMode(SEGC, OUTPUT);
  pinMode(SEGD, OUTPUT);
  pinMode(SEGE, OUTPUT);
  pinMode(SEGF, OUTPUT);
  pinMode(SEGG, OUTPUT);

}


void loop() {
      write_to_HEX(1,1,1,1,1,1,0);
      delay(1000);
      write_to_HEX(0,1,1,0,0,0,0);
      delay(1000);
      write_to_HEX(1,1,0,1,1,0,1);
      delay(1000);
      write_to_HEX(1,1,1,1,0,0,1);
      delay(1000);
      
    
  
}