unsigned const int A = 13;

unsigned const int B = 12;

unsigned const int C = 11;

unsigned const int D = 10;

unsigned const int E = 9;

unsigned const int F = 8;

unsigned const int G = 7;

unsigned const int H = 6;



void setup(void)

{

  pinMode(A, OUTPUT);

  pinMode(B, OUTPUT);

  pinMode(C, OUTPUT);

  pinMode(D, OUTPUT);

  pinMode(E, OUTPUT);

  pinMode(F, OUTPUT);

  pinMode(G, OUTPUT);

  pinMode(H, OUTPUT);

}


//My Functions


void zero(void) {

  digitalWrite(A, LOW);

  digitalWrite(B, HIGH);

  digitalWrite(C, HIGH);

  digitalWrite(D, HIGH);

  digitalWrite(E, HIGH);

  digitalWrite(F, HIGH);

  digitalWrite(G, HIGH);

  digitalWrite(H, LOW);

}


void one(void) {

  digitalWrite(A, LOW);

  digitalWrite(B, LOW);

  digitalWrite(C, LOW);

  digitalWrite(D, HIGH);

  digitalWrite(E, LOW);

  digitalWrite(F, LOW);

  digitalWrite(G, HIGH);

  digitalWrite(H, LOW);

}


void two(void) {

  digitalWrite(A, HIGH);

  digitalWrite(B, LOW);

  digitalWrite(C, HIGH);

  digitalWrite(D, HIGH);

  digitalWrite(E, HIGH);

  digitalWrite(F, HIGH);

  digitalWrite(G, LOW);

  digitalWrite(H, LOW);

}


void three(void) {

  digitalWrite(A, HIGH);

  digitalWrite(B, LOW);

  digitalWrite(C, HIGH);

  digitalWrite(D, HIGH);

  digitalWrite(E, LOW);

  digitalWrite(F, HIGH);

  digitalWrite(G, HIGH);

  digitalWrite(H, LOW);

}


void four(void) {

  digitalWrite(A, HIGH);

  digitalWrite(B, HIGH);

  digitalWrite(C, LOW);

  digitalWrite(D, HIGH);

  digitalWrite(E, LOW);

  digitalWrite(F, LOW);

  digitalWrite(G, HIGH);

  digitalWrite(H, LOW);

}


void five(void) {

  digitalWrite(A, HIGH);

  digitalWrite(B, HIGH);

  digitalWrite(C, HIGH);

  digitalWrite(D, LOW);

  digitalWrite(E, LOW);

  digitalWrite(F, HIGH);

  digitalWrite(G, HIGH);

  digitalWrite(H, LOW);

}


void six(void) {

  digitalWrite(A, HIGH);

  digitalWrite(B, HIGH);

  digitalWrite(C, HIGH);

  digitalWrite(D, LOW);

  digitalWrite(E, HIGH);

  digitalWrite(F, HIGH);

  digitalWrite(G, HIGH);

  digitalWrite(H, LOW);

}


void seven(void) {

  digitalWrite(A, LOW);

  digitalWrite(B, LOW);

  digitalWrite(C, HIGH);

  digitalWrite(D, HIGH);

  digitalWrite(E, LOW);

  digitalWrite(F, LOW);

  digitalWrite(G, HIGH);

  digitalWrite(H, LOW);

}


void eight(void) {

  digitalWrite(A, HIGH);

  digitalWrite(B, HIGH);

  digitalWrite(C, HIGH);

  digitalWrite(D, HIGH);

  digitalWrite(E, HIGH);

  digitalWrite(F, HIGH);

  digitalWrite(G, HIGH);

  digitalWrite(H, LOW);

}


void nine(void) {

  digitalWrite(A, HIGH);

  digitalWrite(B, HIGH);

  digitalWrite(C, HIGH);

  digitalWrite(D, HIGH);

  digitalWrite(E, LOW);

  digitalWrite(F, HIGH);

  digitalWrite(G, HIGH);

  digitalWrite(H, LOW);

}


// Start

void loop(void)

{

  zero();

  delay(1000);

  

  one();

  delay(1000);

  

  two();

  delay(1000);

  

  three();

  delay(1000);

  

  four();

  delay(1000);

  

  five();

  delay(1000);

  

  six();

  delay(1000);

  

  seven();

  delay(1000);

  

  eight();

  delay(1000);

  

  nine();

  delay(1000);

}





















Comments

Popular posts from this blog

How to make a happy birthday song tune using Tinkercad || Arduino projects using Tinkercad || DP (CODE)

How to make LDR Based street light controller using Tinkercad || Part-1 (CODE)

How To Make Smoke Alarm In Tinkercad || How To Use Gas Sensor Using Tinkercad || Doodads Projects (CODE)