top of page
Writer's pictureShivan Patel

[Arduino Quiz 1]

Updated: Mar 2, 2019

int red=10;

int yellow=11;

int green=12;

int button=13;

int red1=8;

int green1=9;


void setup()

{

pinMode(red, OUTPUT);

pinMode(yellow, OUTPUT);

pinMode(green, OUTPUT);

pinMode(red1, OUTPUT);

pinMode(green1, OUTPUT);

pinMode(button, INPUT);

digitalWrite(green, HIGH);

}


void loop()

{

changeLights();

delay(15000);

}


void changeLights()

{

digitalWrite(green,LOW);

digitalWrite(yellow,HIGH);

digitalWrite(red1,LOW);

digitalWrite(green1,LOW);

delay(3000);


digitalWrite(yellow,LOW);

digitalWrite(red,HIGH);

digitalWrite(green1,HIGH);

delay(5000);


digitalWrite(yellow,LOW);

digitalWrite(red,LOW);

digitalWrite(green,HIGH);

digitalWrite(red1, HIGH);

digitalWrite(green1,LOW);

delay(3000);

}


https://vimeo.com/320552031

8 views1 comment

Recent Posts

See All

1 Comment


Johnny
Johnny
Mar 02, 2019

can you fix the thumb image? either you can repost it

Like
bottom of page