// Making an LED Blink
void setup() {
pinMode(D2, OUTPUT);
pinMode(D3, OUTPUT);
digitalWrite(D2, LOW);
digitalWrite(D3, HIGH);
}
void loop() {
// // Excercise 1: On & off every 3 secs
// digitalWrite(D2, HIGH);
// delay(3000);
// digitalWrite(D2, LOW);
// delay(3000);
// // Excercise 2: Blinking & stop
// for (int i=0; i<5; i++) {
// digitalWrite(D2, HIGH);
// delay(500);
// digitalWrite(D2, LOW);
// delay(500);
// }
// delay(2500);
// Excercise 3: On & off every 3 secs for 2 LEDs
digitalWrite(D2, HIGH);
digitalWrite(D3, LOW);
delay(3000);
digitalWrite(D2, LOW);
digitalWrite(D3, HIGH);
delay(3000);
}
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. .