Arduino Simulator

Blink | Arduino Sketch

/*

    Blink

    Turns on the LED for one second, then off for one second, repeatedly.

    This example code is in the public domain.

/*


// put your setup code here, to run once:

void setup( ) {

// initialize the digital pin as an output (you may chose from 0 till 9)

pinMode(0, OUTPUT ) ;

}


// put your main code here, to run repeatedly:

void loop( ) {

digitalWrite(0, HIGH ) ; // turn the LED on

delay(1000) ; // wait for a second

digitalWrite(0, LOW ) ; // turn the LED off

delay(1000) ; // wait for a second

}