Tugas Pendahuluan Modul 1




 

1. Kondisi [kembali]

Percobaan 2 Kondisi 1

® Tampilkan angka 7 delay 1 detik lalu angka 8

 

2. Rangkaian Simulasi [kembali]




3. Flowchart [kembali]


 

4. Listing Program [kembali]

byte sev_seg[] =  {2,3,4,5,6,7,8,9};

 

  void display_seven()

  {

    digitalWrite(2,LOW);

    digitalWrite(3,LOW);

    digitalWrite(4,LOW);

    digitalWrite(5,LOW);

    digitalWrite(6,HIGH);

    digitalWrite(7,HIGH);

    digitalWrite(8,HIGH);

  }

 

   void display_eight()

  {

    digitalWrite(2,HIGH);

    digitalWrite(3,HIGH);

    digitalWrite(4,HIGH);

    digitalWrite(5,HIGH);

    digitalWrite(6,HIGH);

    digitalWrite(7,HIGH);

    digitalWrite(8,HIGH);

  }

 

  void setup()

  {

    for(int a = 0; a < 9; a++)

    {

    pinMode(sev_seg[a], OUTPUT);   

    }

  }

 

  void loop()

  {

    display_seven();

    delay(1000);

    display_eight();

    delay(1000);

  }

 

5. Video [kembali]

 


 

6. Link Download [kembali]

 

 

 

Tidak ada komentar:

Posting Komentar