1. Kondisi [Kembali]
Tambahkan push button pada input, ketika push button ditekan seluruh led 2,4,6,8 hidup
void setup() {
// put your setup code here, to run once:
for(int i=0;i<10;i++)
{
pinMode(pin[i],OUTPUT);
}
}
void loop() {
// put your main code here, to run repeatedly:
digitalWrite(0,LOW);
digitalWrite(1,HIGH);
digitalWrite(2,LOW);
digitalWrite(3,HIGH);
digitalWrite(4,LOW);
digitalWrite(5,HIGH);
digitalWrite(6,LOW);
digitalWrite(7,HIGH);
}
Tidak ada komentar:
Posting Komentar