Project Name: Basic LED

Aim of the project:  The Arduino board has one built-in on digital pin 13.

Component:

  1. Arduino
  2. Led

Circuit Diagram:

(+)Long leg (Anode) –> 13
(-)Short leg (cathode) –> GND

Code:

void setup() {
  pinMode(13, OUTPUT); // pin 13 - change value if you have LED on diff pin
}

void loop() {
  digitalWrite(13, HIGH);  // set pin 13 to high voltage, turning LED on
  delay(1000);             // wait 1000 milliseconds, or one second.
  digitalWrite(13, LOW);   // set pin 13 to low voltage, or zero. LED off.
  delay(1000);             //wait one second before starting the loop again.
}

Runs Steps:

These are the steps you need to follow in order to be up and running:

  1. Get an Arduino board
  2. Download the Arduino environment
  3. Install the USB drivers
  4. Connect the board
  5. Upload a program

Video: