Kondisi awal LED mati lalu hidup bergantian dari kanan ke kiri secara berulang-ulang
2. Gambar Rangkaian [Kembali]
3. Flowchart [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 = 8; hidup >= 0; hidup--)
{
digitalWrite(led[hidup], HIGH);
delay(100);
}
delay(100);
for (int mati = 8; mati >= 0; mati--)
{
digitalWrite(led[mati], LOW);
delay(100);
}
delay(100);
}
5. Video Simulasi [Kembali]
6. Link Download [Kembali]
Rangkaian disini
Video disini
HTML disini
0 komentar:
Posting Komentar