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

Arduino UNO Pushbutton-Controlled Blinking LED Circuit

View and Edit Project In Cirkit DesignerImage of Arduino UNO Pushbutton-Controlled Blinking LED Circuit

Circuit Documentation

Summary

This circuit is designed to control an LED using a pushbutton and an Arduino UNO. When the pushbutton is pressed, the LED will blink. The circuit includes an Arduino UNO, a resistor, a red LED, and a pushbutton.

Component List

  1. Arduino UNO

    • Description: A microcontroller board based on the ATmega328P.
    • Pins: UNUSED, IOREF, Reset, 3.3V, 5V, GND, Vin, A0, A1, A2, A3, A4, A5, SCL, SDA, AREF, D13, D12, D11, D10, D9, D8, D7, D6, D5, D4, D3, D2, D1, D0
  2. Resistor

    • Description: A 220 Ohm resistor.
    • Pins: pin1, pin2
    • Properties:
      • Resistance: 220 Ohms
  3. LED: Two Pin (red)

    • Description: A red LED with two pins.
    • Pins: cathode, anode
  4. Pushbutton

    • Description: A pushbutton with four pins.
    • Pins: Pin 1 (in), Pin 2 (in), Pin 3 (out), Pin 4 (out)

Wiring Details

Arduino UNO

Resistor

LED: Two Pin (red)

Pushbutton

Code Documentation

Arduino UNO Code

int button = 0;

void setup() {
  // put your setup code here, to run once:
  pinMode(2, INPUT);
  pinMode(4, OUTPUT);
  Serial.begin(9600);
}

void loop() {
  // put your main code here, to run repeatedly:
  button = digitalRead(2);
  Serial.println(button);

  if (button == LOW) {
    digitalWrite(4, LOW);
  } else {
    digitalWrite(4, HIGH);
    delay(250);
    digitalWrite(4, LOW);
    delay(250);
  }
}

LED: Two Pin (red) Code

void setup() {
  // put your setup code here, to run once:

}

void loop() {
  // put your main code here, to run repeatedly:

}

This documentation provides a comprehensive overview of the circuit, including a summary, detailed component list, wiring details, and the code used in the microcontrollers.