1. Kondisi [Kembali]
Percobaan 1 No.14
Kondisi awal LED mati lalu hidup secara bergantian led 1,2,3,4 selanjutnya 5,6,7,8 secara berulang
2. Gambar Rangkaian Simulasi [Kembali]
4. Listing Program [Kembali]
int led []= {2, 3, 4, 5, 6, 7, 8, 9};void setup() {for (int i=0; i<=8; i++){ pinMode (led[i], OUTPUT); }}
void loop() { for (int hidup = 0; hidup<=3; hidup++){ digitalWrite(led[hidup], HIGH); delay(500); }//delay(500);//for (int mati=0; mati<=3; mati++){// digitalWrite(led[mati], LOW);// delay(500);// } delay(2000); for (int hidup=4; hidup<=7; hidup++){ digitalWrite(led[hidup], HIGH); delay(500); } delay(500); for(int mati=0; mati<=7; mati++){ digitalWrite(led[mati], LOW); delay(500); } delay(500);}
5. Flowchart [Kembali]
6. Link Download [Kembali]
Video Simulasi Klik disiniListing Program Klik disiniFlowchart Klik disiniHTML Klik disini
4. Listing Program [Kembali]
int led []= {2, 3, 4, 5, 6, 7, 8, 9};
void setup() {
for (int i=0; i<=8; i++)
{
pinMode (led[i], OUTPUT);
}
}
void loop() {
for (int hidup = 0; hidup<=3; hidup++){
digitalWrite(led[hidup], HIGH);
delay(500);
}
//delay(500);
//for (int mati=0; mati<=3; mati++){
// digitalWrite(led[mati], LOW);
// delay(500);
// }
delay(2000);
for (int hidup=4; hidup<=7; hidup++){
digitalWrite(led[hidup], HIGH);
delay(500);
}
delay(500);
for(int mati=0; mati<=7; mati++){
digitalWrite(led[mati], LOW);
delay(500);
}
delay(500);
}
5. Flowchart [Kembali]
6. Link Download [Kembali]
Video Simulasi Klik disini
Listing Program Klik disini
Flowchart Klik disini
HTML Klik disini
Tidak ada komentar:
Posting Komentar