You are on page 1of 5

Like any program, sketches are a vey strict set of

instructions, and very sensitive to errors.

In the Arduino world, a library is a small piece of code that


carries out a specific function. Rather than enter this same
code repeatedly in your sketches, you can add a command
that borrrows code from library.
Follow these steps to set up your test:
Insert the long positive leg (also known as +5v
or anodes) of the LED into pin 13 on the
Arduino. Connect the short negative leg
(cathode) to the GND pin next to pin 13
int led = 13;
void setup()
{
pinMode(led, OUTPUT)
}
void loop() {
digitalWrite(led, HIGH);
delay(1000);
digitalWrite(led, LOW);
delay(1000);
}

You might also like