Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Top Posters

Who's Online (0)

Powered by Vanilla. Made with Bootstrap.
Arduino 4 Led Alternate Blink
  • Xin
    Posts: 3,251
    Experimenting with Arduino, so posting sources here for anyone that may need them.

    int led1 = 11;
    int led2 = 12;
    int led3 = 10;
    int led4 = 9;


    void setup() {
    pinMode(led1, OUTPUT);
    pinMode(led2, OUTPUT);
    pinMode(led3, OUTPUT);
    pinMode(led4, OUTPUT);

    }

    void loop() {
    digitalWrite(led1, HIGH);
    digitalWrite(led2, LOW);
    digitalWrite(led3, LOW);
    digitalWrite(led4, LOW);
    delay(200);
    digitalWrite(led1, LOW);
    digitalWrite(led2, HIGH);
    digitalWrite(led3, LOW);
    digitalWrite(led4, LOW);
    delay(200);
    digitalWrite(led1, LOW);
    digitalWrite(led2, LOW);
    digitalWrite(led3, HIGH);
    digitalWrite(led4, LOW);
    delay(200);
    digitalWrite(led1, LOW);
    digitalWrite(led2, LOW);
    digitalWrite(led3, LOW);
    digitalWrite(led4, HIGH);
    delay(200);
    }

    Xin
  • dear sir, i am new to your forum and i am totally confuse how to post a new thread here.kindly suggest me the way to post new thread here.. thanks
  • Sh3llc0d3
    Posts: 1,910

    dear sir, i am new to your forum and i am totally confuse how to post a new thread here.kindly suggest me the way to post new thread here.. thanks



    [spoiler]http://i.imgur.com/yGZS2.gif[/spoiler]

    There you go.
  • thank you very much sir..
  • m0rph
    Posts: 332
    @Sh3llc0d3

    ROTFL!!!!!!
    while( !(succeed = try() ) );
  • Sh3llc0d3
    Posts: 1,910
    said:


    @Sh3llc0d3

    ROTFL!!!!!!



    xD
  • Xin
    Posts: 3,251
    said:


    dear sir, i am new to your forum and i am totally confuse how to post a new thread here.kindly suggest me the way to post new thread here.. thanks



    [spoiler]http://i.imgur.com/yGZS2.gif[/spoiler]

    There you go.


    Haha i didnt realise it was moving until i saw it out the corner of my eye xD
    Xin