TP M1P1




1. Kondisi
[Kembali]

Kondisi awal LED mti lalu hidup bergantian, LED 1,3,5,7 selanjutnya 2,4,6,8 secara berulang

2. Hardware [Kembali]

LED

arduino

resistor

power supply


3. Rangkaian Simulasi [Kembali]




4. Flowchart [Kembali]



5. Listing Program [Kembali]

int LED1=2;//mengenali Varibel LED1 untuk pin 2

int LED2=3;//mengenali Varibel LED2 untuk pin 3

int LED3=4;//mengenali Varibel LED3 untuk pin 4

int LED4=5;//mengenali Varibel LED4 untuk pin 5

int LED5=6;//mengenali Varibel LED5 untuk pin 6

int LED6=7;//mengenali Varibel LED6 untuk pin 7

int LED7=8;//mengenali Varibel LED7 untuk pin 8

int LED8=9;//mengenali Varibel LED8 untuk pin 9



void setup()


{


pinMode(2, OUTPUT);


pinMode(3, OUTPUT);


pinMode(4, OUTPUT);


pinMode(5, OUTPUT);


pinMode(6, OUTPUT);


pinMode(7, OUTPUT);


pinMode(8, OUTPUT);


pinMode(9, OUTPUT);


}



void loop()


{

delay(1000);


digitalWrite(2, HIGH);


digitalWrite(3, LOW);


digitalWrite(4, HIGH);


digitalWrite(5, LOW);


digitalWrite(6, HIGH);


digitalWrite(7, LOW);


digitalWrite(8, HIGH);


digitalWrite(9, LOW);


delay(1000);


digitalWrite(2, LOW);


digitalWrite(3, HIGH);


digitalWrite(4, LOW);


digitalWrite(5, HIGH);


digitalWrite(6, LOW);


digitalWrite(7, HIGH);


digitalWrite(8, LOW);


digitalWrite(9, HIGH);


}


6. Video [Kembali]




7. Link Download [Kembali]

Rangkaian download
video download

Tidak ada komentar:

Posting Komentar