BlinkyΒΆ

The basic blinky program.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
void setup() {
        // This code block runs only once, ie: it is the setup code
  pinMode(D1,OUTPUT); //Set the pin D1 to output
}

void loop() {

  digitalWrite(D1,LOW);   //Set the pin D1 to LOW ie 0v
  delay(1000);                    //Wait for 1 sec(1000 ms) by creating a delay
  digitalWrite(D1,HIGH);  //Set the pin D1 to HIGH ie 3.3v
  delay(1000);

}