Button switch, LED, resistor on Arduino Simulation (Tinkercad)

Поделиться
HTML-код
  • Опубликовано: 7 ноя 2024
  • Controlling an LED with a Button Switch in Arduino Simulation using Tinkercad
    Introduction:
    Controlling an LED with a button switch is a fundamental project for learning about digital input and output with Arduino. This project demonstrates how to turn an LED on and off using a button. Tinkercad’s simulation environment allows you to set up and test this circuit virtually.
    Steps to Create the Simulation:
    Access Tinkercad:
    Visit Tinkercad’s website and log in. Go to “Circuits” and click “Create new circuit.”
    Add Components:
    Drag an Arduino Uno onto the workspace.
    Drag an LED, a resistor (220Ω), and a pushbutton switch onto the workspace.
    Optionally, add a breadboard for better organization.
    Wire the Circuit:
    LED Connections:
    Place the LED on the breadboard.
    Connect the long leg (anode) of the LED to one end of the resistor.
    Connect the other end of the resistor to a digital output pin on the Arduino (e.g., pin 13).
    Connect the short leg (cathode) of the LED to the ground (GND) rail on the breadboard.
    Button Connections:
    Place the pushbutton on the breadboard.
    Connect one terminal of the button to a digital input pin on the Arduino (e.g., pin 2).
    Connect the other terminal to the ground (GND) rail on the breadboard.
    Connect a pull-up resistor (10kΩ) between the input pin and the 5V rail to ensure stable readings.

Комментарии •