1. Kondisi [Kembali]
2. Rangkaian Simulasi [Kembali]
3.Flowchart [Kembali]
4. Listing Program [Kembali]
byte pin[] = {2, 3, 4, 5, 6, 7, 8, 9}; //Deklarasi pin yang digunakan pada 7-segment dengan tipe data byte
void setup() //Semua kode dalam fungsi ini hanya dieksekusi sekali
{ for (int i = 0; i < 9; i++) //Kondisi perulangan dari 0 hingga batas kecil dari 9; Increase
{
pinMode(pin[i], OUTPUT); //Deklarasi pin yang digunakan sebagai OUTPUT
}
}
void loop() {
// put your main code here, to run repeatedly:
{
digitalWrite(2, HIGH);
digitalWrite(3, HIGH);
digitalWrite(4, HIGH);
digitalWrite(5, LOW);
digitalWrite(6, HIGH);
digitalWrite(7, HIGH);
digitalWrite(8, HIGH);
digitalWrite(9, HIGH);
delay(1000);
digitalWrite(2, HIGH);
digitalWrite(3, LOW);
digitalWrite(4, LOW);
digitalWrite(5, LOW);
digitalWrite(6, LOW);
digitalWrite(7, HIGH);
digitalWrite(8, HIGH);
digitalWrite(9, HIGH);
delay(1000);
digitalWrite(2, HIGH);
digitalWrite(3, HIGH);
digitalWrite(4, HIGH);
digitalWrite(5, LOW);
digitalWrite(6, HIGH);
digitalWrite(7, HIGH);
digitalWrite(8, LOW);
digitalWrite(9, HIGH);
delay(1000);
}
}
5. Video [Kembali]
Download Video disini
Download Rangkaian disini
Download HTML disini
Tidak ada komentar:
Posting Komentar