Blinking an LED

Your First Circuit

Now that you know the basics, let's build something!

The Circuit

Connect the LED to pin 13.

The Code

CPP
void setup() {
  pinMode(13, OUTPUT);
}

void loop() {
  digitalWrite(13, HIGH);
  delay(1000);
  digitalWrite(13, LOW);
  delay(1000);
}
If your LED is blinking, congratulations! You've just built your first robot.