1. kondisi [kembali]
kondisi awal LED mati lalu hidup bergantian LED dari kiri secara berulang.
2. rangkaian simulasi [kembali]
3. video simulasi [kembali]
4. prinsip kerja [kembali]
saat arduino diberikan koding yang sudah di buat di app arduino, yaitu isi perintah untuk LED hidup atau mati. Pada koding ada 4 kondisi, dimana masing-masing kaki dari arduino di hubungkan dengan LED. Kaki 2,3,4,5,6,7,8,9 dihubungkan ke LED 1,2,3,4,5,6,7,8. Kondisi 1, LED 1,2 keadaan hidup (HIGH) dan sisanya mati (LOW) . Kondisi 2, LED 3,4 keadaan hidup (HIGH) dan sisanya mati (LOW) . Kondisi 3, LED 5,6 keadaan hidup (HIGH) dan sisanya mati (LOW). Kondisi 4, LED 7,8 keadaan hidup (HIGH) dan sisanya mati (LOW).
5. flowchart [kembali]
6. listing program [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() {
digitalWrite(2,HIGH);
digitalWrite(3,HIGH);
digitalWrite(4,LOW);
digitalWrite(5,LOW);
digitalWrite(6,LOW);
digitalWrite(7,LOW);
digitalWrite(8,LOW);
digitalWrite(9,LOW);
delay(100);
digitalWrite(2,LOW);
digitalWrite(3,LOW);
digitalWrite(4,HIGH);
digitalWrite(5,HIGH);
digitalWrite(6,LOW);
digitalWrite(7,LOW);
digitalWrite(8,LOW);
digitalWrite(9,LOW);
delay(100);
digitalWrite(2,LOW);
digitalWrite(3,LOW);
digitalWrite(4,LOW);
digitalWrite(5,LOW);
digitalWrite(6,HIGH);
digitalWrite(7,HIGH);
digitalWrite(8,LOW);
digitalWrite(9,LOW);
delay(100);
digitalWrite(2,LOW);
digitalWrite(3,LOW);
digitalWrite(4,LOW);
digitalWrite(5,LOW);
digitalWrite(6,LOW);
digitalWrite(7,LOW);
digitalWrite(8,HIGH);
digitalWrite(9,HIGH);
delay(100);
}
7. link download [kembali]
- simulasi proteus download
- video simulasi download
- listing program download
Tidak ada komentar:
Posting Komentar