share for youtube acct

this is test... i m working on post for this information only...

int white = 13;
int brown = 12;
int whitee = 11;
int grey = 10;
int brownn = 9;
int button = 2;
int crossTime = 5000;
unsigned long changeTime;

void setup (){
pinMode(white,OUTPUT) ;
pinMode(brown,OUTPUT);
pinMode(whitee ,OUTPUT);
pinMode(grey,OUTPUT);
pinMode(brownn ,OUTPUT);
pinMode(button, INPUT);
digitalWrite(whitee,HIGH);
digitalWrite(grey,HIGH);
}

void loop (){
int state = digitalRead(button);
if (state == HIGH && (millis() - changeTime) > 5000) {
changeLights() ;
}
}

void changeLights(){
digitalWrite( whitee,LOW);
digitalWrite( white,HIGH);
digitalWrite( brown, LOW);
digitalWrite(grey,LOW);
digitalWrite(brownn,HIGH);
delay(2000);

for (int x=0; x<10; x++) {
digitalWrite(brownn , HIGH);
delay(250);
digitalWrite(brownn , LOW);
delay(250);
}
digitalWrite(grey ,HIGH);
delay(300);

digitalWrite(brown, HIGH);
digitalWrite(white,LOW);
delay(1000);
digitalWrite(whitee , HIGH);
digitalWrite(brown, LOW);

changeTime = millis();
}

Sketch with button of intersection light.fzz (6.63 KB)

i am trying to frigure it out how can i put the sketch picture on this post...

Do you mean having code in a box like this?

this is the code

You need to use the code button marked with # when you enter the post.

Otherwise I don't understand your question.

i test export from fritzing.org

Don't start a second thread about the same thing please.

  • Moderator