void setup()
{
pinMode(13, OUTPUT);
}
void loop()
{
digitalWrite(13, HIGH);
delay(1000);
digitalWrite(13, LOW);
delay(1000);
}
//Connect the LED:
//Place the LED on the breadboard (or directly connect it to the Arduino pins).
//The longer leg of the LED is the positive leg (anode), and the shorter leg is the negative leg (cathode).
//Connect the Resistor:
//Connect a 220-ohm resistor to the anode (longer leg) of the LED to limit the current.
//Connect the other end of the resistor to digital pin 13 of the Arduino.
//Connect the Cathode to Ground:
//Connect the cathode (shorter leg) of the LED to the GND (Ground) pin on the Arduino.