Cirkit Designer LogoCirkit DesignerYour all-in-one circuit design IDE Launch Cirkit Designer App

Arduino UNO LED Control with Resistor

View and Edit Project In Cirkit DesignerImage of Arduino UNO LED Control with Resistor

Circuit Documentation

Summary

This circuit consists of an Arduino UNO microcontroller, a resistor, and a red LED. The Arduino UNO is programmed to control the LED, turning it on by setting one of its digital pins high. The resistor is used to limit the current flowing through the LED to prevent damage.

Component List

Arduino UNO

Resistor

LED: Two Pin (red)

Wiring Details

Arduino UNO

Resistor

LED: Two Pin (red)

Code Documentation

Arduino UNO Code

void setup() {
  // put your setup code here, to run once:
  pinMode(2, OUTPUT);
}

void loop() {
  // put your main code here, to run repeatedly:
  digitalWrite(2, HIGH);
}

This code sets up pin 2 of the Arduino UNO as an output in the setup() function. In the loop() function, it continuously sets pin 2 to HIGH, which turns on the LED connected to this pin through the resistor.