LED Interfacing with Arduino

  • Connect one end of the resistor to the digital pin on the Arduino board (e.g., pin 13), and the other end of the resistor to the anode (+) of the LED.
  • Connect the cathode (-) of the LED to the ground (GND) pin on the Arduino board.


This program uses the pinMode() function to set the digital pin 13 as an output, and the digitalWrite() function to turn the LED on and off. The delay() function is used to pause the program for one second between each on/off cycle.

When you upload this program to your Arduino board, the LED connected to pin 13 should start blinking on and off with a one-second interval.