1. Kondisi [kembali]
Kondisi awal LED mati lalu hidup bergantian dari Pinggir ke tengah secara berulang dengan delay 500 ms
2. Rangkaian Simulasi [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() {
// put your main code here, to run repeatedly:
for (int j = 0; j <= 3; j++)
{
int k = 7 - j ;
digitalWrite(led[j], HIGH);
digitalWrite(led[k], HIGH);
k = 0;
delay (500);
}
delay(100);
for (int l = 0; l <= 3; l++)
{
int m = 7 - l ;
digitalWrite(led[l], LOW);
digitalWrite(led[m], LOW);
m = 0;
delay (500);
}
}
5. Video [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() {
// put your main code here, to run repeatedly:
for (int j = 0; j <= 3; j++)
{
int k = 7 - j ;
digitalWrite(led[j], HIGH);
digitalWrite(led[k], HIGH);
k = 0;
delay (500);
}
delay(100);
for (int l = 0; l <= 3; l++)
{
int m = 7 - l ;
digitalWrite(led[l], LOW);
digitalWrite(led[m], LOW);
m = 0;
delay (500);
}
}
6. Link Download [kembali]
1. File HTML
Download File
2. Video
Download File
3. File rangkaian simulasi
Download File
Tidak ada komentar:
Posting Komentar