int led = D2;
void setup() {
pinMode( led, OUTPUT );
// D2 is the out put pin
}
void loop() {
for( int i = 0; i < 5; i++ ) {
//loop for 5 times
digitalWrite( led, HIGH );
delay( 500 );
digitalWrite( led, LOW );
delay( 500 );
//each blink is 1/2 second
}
digitalWrite( led, LOW );
delay( 3000 );
//stop for 3 seconds after 5 blinks
}
Click to Expand
Content Rating
Is this a good/useful/informative piece of content to include in the project? Have your say!
You must login before you can post a comment. .