Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
28 views12 pages

Arduino Word

The document contains code for an Arduino project that controls three LEDs (red, yellow, and green) using digital pins. The setup function initializes the pins as outputs, while the loop function alternates the LEDs' states with delays to create a flashing effect. The code appears to have repetitive sequences for controlling the LED states.

Uploaded by

xyrah laya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views12 pages

Arduino Word

The document contains code for an Arduino project that controls three LEDs (red, yellow, and green) using digital pins. The setup function initializes the pins as outputs, while the loop function alternates the LEDs' states with delays to create a flashing effect. The code appears to have repetitive sequences for controlling the LED states.

Uploaded by

xyrah laya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 12

//SMP Budhi Dharma Balige_Deral Prissyela_7F_Proyek 2 Flip Flop

int redPin=10;

int yellowPin=9;

int greenPin=8;

void setup() {

pinMode(redPin,OUTPUT);

pinMode(yellowPin,OUTPUT);

pinMode(greenPin,OUTPUT);

void loop() {

digitalWrite(redPin,LOW);

delay(100);

digitalWrite(yellowPin,HIGH);

delay(100);

digitalWrite(greenPin,LOW);

delay(100);

digitalWrite(greenPin,LOW);

delay(100);

digitalWrite(yellowPin,LOW);

delay(100);

digitalWrite(redPin,LOW);

delay(100);

digitalWrite(redPin,LOW);

delay(100);

digitalWrite(yellowPin,HIGH);

delay(100);

digitalWrite(greenPin,LOW);

delay(100);
digitalWrite(greenPin,LOW);

delay(100);

digitalWrite(yellowPin,LOW);

delay(100);

digitalWrite(redPin,LOW);

delay(100);

digitalWrite(redPin,LOW);

delay(100);

digitalWrite(yellowPin,HIGH);

delay(100);

digitalWrite(greenPin,LOW);

delay(100);

digitalWrite(greenPin,LOW);

delay(100);

digitalWrite(yellowPin,LOW);

delay(100);

digitalWrite(redPin,LOW);

delay(100);

digitalWrite(redPin,LOW);

delay(100);

digitalWrite(yellowPin,HIGH);

delay(100);

digitalWrite(greenPin,LOW);

delay(100);

digitalWrite(greenPin,LOW);

delay(100);
digitalWrite(yellowPin,LOW);

delay(100);

digitalWrite(redPin,LOW);

delay(100);

digitalWrite(redPin,LOW);

delay(100);

digitalWrite(yellowPin,HIGH);

delay(100);

digitalWrite(greenPin,LOW);

delay(100);

digitalWrite(greenPin,LOW);

delay(100);

digitalWrite(yellowPin,LOW);

delay(100);

digitalWrite(redPin,LOW);

delay(100);

digitalWrite(redPin,LOW);

delay(100);

digitalWrite(yellowPin,HIGH);

delay(100);

digitalWrite(greenPin,LOW);

delay(100);

digitalWrite(greenPin,LOW);

delay(100);

digitalWrite(yellowPin,LOW);

delay(100);

digitalWrite(redPin,LOW);
delay(100);

digitalWrite(redPin,LOW);

delay(100);

digitalWrite(yellowPin,HIGH);

delay(100);

digitalWrite(greenPin,LOW);

delay(100);

digitalWrite(greenPin,LOW);

delay(100);

digitalWrite(yellowPin,LOW);

delay(100);

digitalWrite(redPin,LOW);

delay(100);

digitalWrite(redPin,LOW);

delay(100);

digitalWrite(yellowPin,HIGH);

delay(100);

digitalWrite(greenPin,LOW);

delay(100);

digitalWrite(greenPin,LOW);

delay(100);

digitalWrite(yellowPin,LOW);

delay(100);

digitalWrite(redPin,LOW);

delay(100);

digitalWrite(greenPin,LOW);
delay(100);

digitalWrite(yellowPin,HIGH);

delay(100);

digitalWrite(redPin,LOW);

delay(100);

digitalWrite(greenPin,LOW);

delay(100);

digitalWrite(yellowPin,LOW);

delay(100);

digitalWrite(redPin,LOW);

delay(100);

digitalWrite(redPin,LOW);

delay(100);

digitalWrite(yellowPin,HIGH);

delay(100);

digitalWrite(greenPin,LOW);

delay(100);

digitalWrite(greenPin,LOW);

delay(100);

digitalWrite(yellowPin,LOW);

delay(100);

digitalWrite(redPin,LOW);

delay(100);

digitalWrite(greenPin,LOW);

delay(100);

digitalWrite(yellowPin,LOW);

delay(100);
digitalWrite(redPin,HIGH);

delay(100);

digitalWrite(greenPin,LOW);

delay(100);

digitalWrite(yellowPin,LOW);

delay(100);

digitalWrite(redPin,LOW);

delay(100);

digitalWrite(greenPin,LOW);

delay(100);

digitalWrite(yellowPin,LOW);

delay(100);

digitalWrite(redPin,HIGH);

delay(100);

digitalWrite(greenPin,LOW);

delay(100);

digitalWrite(yellowPin,LOW);

delay(100);

digitalWrite(redPin,LOW);

delay(100);

digitalWrite(greenPin,LOW);

delay(100);

digitalWrite(yellowPin,LOW);

delay(100);

digitalWrite(redPin,HIGH);

delay(100);
digitalWrite(greenPin,LOW);

delay(100);

digitalWrite(yellowPin,LOW);

delay(100);

digitalWrite(redPin,LOW);

delay(100);

digitalWrite(greenPin,LOW);

delay(100);

digitalWrite(yellowPin,LOW);

delay(100);

digitalWrite(redPin,HIGH);

delay(100);

digitalWrite(greenPin,LOW);

delay(100);

digitalWrite(yellowPin,LOW);

delay(100);

digitalWrite(redPin,LOW);

delay(100);

digitalWrite(greenPin,LOW);

delay(100);

digitalWrite(yellowPin,LOW);

delay(100);

digitalWrite(redPin,HIGH);

delay(100);

digitalWrite(greenPin,LOW);

delay(100);

digitalWrite(yellowPin,LOW);
delay(100);

digitalWrite(redPin,LOW);

delay(100);

digitalWrite(greenPin,HIGH);

delay(100);

digitalWrite(yellowPin,LOW);

delay(100);

digitalWrite(redPin,LOW);

delay(100);

digitalWrite(greenPin,LOW);

delay(100);

digitalWrite(yellowPin,LOW);

delay(100);

digitalWrite(redPin,LOW);

delay(100);

digitalWrite(greenPin,HIGH);

delay(100);

digitalWrite(yellowPin,LOW);

delay(100);

digitalWrite(redPin,LOW);

delay(100);

digitalWrite(greenPin,LOW);

delay(100);

digitalWrite(yellowPin,LOW);

delay(100);

digitalWrite(redPin,LOW);

delay(100);
digitalWrite(greenPin,HIGH);

delay(100);

digitalWrite(yellowPin,LOW);

delay(100);

digitalWrite(redPin,LOW);

delay(100);

digitalWrite(greenPin,LOW);

delay(100);

digitalWrite(yellowPin,LOW);

delay(100);

digitalWrite(redPin,LOW);

delay(100);

digitalWrite(greenPin,HIGH);

delay(100);

digitalWrite(yellowPin,LOW);

delay(100);

digitalWrite(redPin,LOW);

delay(100);

digitalWrite(greenPin,LOW);

delay(100);

digitalWrite(yellowPin,LOW);

delay(100);

digitalWrite(redPin,LOW);

delay(100);

digitalWrite(greenPin,HIGH);

delay(100);
digitalWrite(yellowPin,LOW);

delay(100);

digitalWrite(redPin,LOW);

delay(100);

digitalWrite(greenPin,LOW);

delay(100);

digitalWrite(yellowPin,LOW);

delay(100);

digitalWrite(redPin,LOW);

delay(100);

digitalWrite(greenPin,HIGH);digitalWrite(redPin,HIGH)

; delay(100);

digitalWrite(yellowPin,LOW);

delay(100);

digitalWrite(redPin,LOW);

delay(100);

digitalWrite(greenPin,LOW);

delay(100);

digitalWrite(yellowPin,LOW);

delay(100);

digitalWrite(redPin,LOW);

delay(100);

digitalWrite(greenPin,HIGH);digitalWrite(redPin,HIGH)

; delay(100);

digitalWrite(yellowPin,LOW);

delay(100);

digitalWrite(redPin,LOW);
delay(100);

digitalWrite(greenPin,LOW);

delay(100);

digitalWrite(yellowPin,LOW);

delay(100);

digitalWrite(redPin,LOW);

delay(100);

digitalWrite(greenPin,HIGH);digitalWrite(redPin,HIGH)

; delay(100);

digitalWrite(yellowPin,LOW);

delay(100);

digitalWrite(redPin,LOW);

delay(100);

digitalWrite(greenPin,LOW);

delay(100);

digitalWrite(yellowPin,LOW);

delay(100);

digitalWrite(redPin,LOW);

delay(100);

digitalWrite(greenPin,HIGH);digitalWrite(redPin,HIGH)

; delay(100);

digitalWrite(yellowPin,LOW);

delay(100);

digitalWrite(redPin,LOW);

delay(100);

digitalWrite(greenPin,LOW);
delay(100);

digitalWrite(yellowPin,LOW);

delay(100);

digitalWrite(redPin,LOW);

delay(100);

digitalWrite(greenPin,HIGH);digitalWrite(redPin,HIGH)

; delay(100);

digitalWrite(yellowPin,LOW);

delay(100);

digitalWrite(redPin,LOW);

delay(100);

digitalWrite(greenPin,LOW);

delay(100);

digitalWrite(yellowPin,LOW);

delay(100);

digitalWrite(redPin,LOW);

delay(100);

You might also like