Pada
Praktikum modul 1, dipilih percobaan 1 dengan kondisi no 11 yaitu "
Kondisi awal Led mati lalu hidup berkedip dengan delay 5 detik "
LED Mati
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);
}
Rangkaian Simulasi Proteus [ DOWNLOAD ]
Video Simulasi [ DOWNLOAD ]
HTML [ DOWNLOAD ]
No comments:
Post a Comment