// first sketch
// declare a variable and load it with value
int ledPinRed = D2;
void setup(){
// set D2 as output pin
pinMode(ledPin, OUTPUT);
}
void loop(){
//switch it on
digitalWrite(ledPin, HIGH);
// wait for a second
delay(1000);
// switch it off
digitalWrite(ledPin, LOW);
// wait for a second
delay(1000);
// repeat
}
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. .