1. Kondisi [kembali]
Modul 1 percobaan 1 nomor 11 :
Kondisi awal LED mati lalu hidup berkedip dengan delay 5 detik
4. Listing Program [kembali]
5. Video [kembali]
int led [ ] = {2, 3, 4, 5, 6, 7, 8, 9};
void setup()
{
for (int i = 0; i <= 7; i++)
pinMode (led[i], OUTPUT);
}
void loop(){
for (int hidup = 0; hidup <= 7; hidup++)
{
digitalWrite(led[hidup], HIGH);
}
delay(5000);
for (int mati = 0; mati <= 7; mati++)
{
digitalWrite(led[mati], LOW);
}
delay(5000);
}
Tidak ada komentar:
Posting Komentar