FAQ hub / Arduino
Arduino frequently asked questions
Arduino boards, sketches, pins and serial output — answers taken from the Arduino guides on this site.
- 9real questions
- 3source guides
- 5related pages
Frequently asked questions
9 answers, each linked to the guide it comes from.
What is this circuit for?
A digital output pin drives a red LED through a 220 ohm series resistor, while a push button connects a digital input pin to the 5 volt rail. A 10 kiloohm pull-down resistor holds the input at LOW while the button is open. The sketch reads the input continuously: when the button is pressed the output goes HIGH and the LED lights; when it is released the output goes LOW and the LED goes off. It is the smallest example that combines digital reading with digital driving.
How does it work?
The board reads the voltage level at the digital input pin to decide the button state. Pressing the button connects the pin to 5 V, so a HIGH level (logic 1) is read. Releasing it leaves the input floating, but the 10 kiloohm pull-down resistor pulls the voltage down to 0 V and a LOW level (logic 0) is read. These two stable states let the board tell whether the button is really pressed. The sketch then sets the output pin HIGH or LOW accordingly, and the 220 ohm resistor limits the current through the LED so the component is protected. Without the pull-down resistor the input would float and random values would be read.
What should I see at the end?
The red LED lights while the button is held down and goes off when the button is released.
Do I need to solder anything?
No. A solderless breadboard holds component legs with spring clips, so you can reuse every part.
Are the two power rails joined?
Often they are split in the middle. Test with a continuity setting before relying on the whole rail.
Why does my LED stay dark?
Check LED polarity, confirm the resistor shares a row with the LED leg, and verify the digital pin is set as an output.
What does this circuit do?
A basic input-output circuit that uses a button and a pull-down resistor to turn an Arduino output LED on and off.
Source: Button-Controlled LED
How does the circuit work?
The control board determines the button state by reading the voltage level at the digital input pin. When the button is pressed, the pin is connected to 5 volts and HIGH (logic 1) is read. When the button is released, the input end is left floating; thanks to the 10-kilohm pull-down resistor the voltage is pulled to 0 volts and LOW (logic 0) is read. These two stable states let the board clearly understand whether the button is actually pressed. The software sets the output pin HIGH or LOW according to the state it reads; the 220-ohm resistor limits the current through the LED to protect the component. Without the pull-down resistor, the input would float and random values would be read.
Source: Button-Controlled LED
What is the expected result?
The red LED lights up while the button is pressed and goes out when the button is released.
Source: Button-Controlled LED
How to use these answers
Three short steps.
- Find your symptom
Open the question that matches what you see on your board or in your sketch. - Read the short answer
Each answer gives the most likely cause first, then the check that confirms it. - Open the full guide
Follow the source link under the answer for the complete circuit and code.
Related guides
Five real pages to continue from here.
-
Guide
Arduino circuits: a first hands-on project
Build a first Arduino circuit with a button, a 220 ohm resistor and an LED. Learn digital input, pull-down wiring and safe current limiting step. With
-
Guide
Arduino breadboard wiring for beginners
Learn Arduino breadboard wiring: terminal strips, power rails, the centre trench, LED polarity, resistor placement and five checks before you. Step-by
-
Guide
Button-Controlled LED
Build a button-controlled LED circuit: wire a pull-down resistor, read a digital input and drive an LED on an Arduino step by step. With tips.
-
Guide
Arduino port not detected? Fix the cable and driver
When no port appears, the cause is usually a charge-only cable, a missing driver or a stuck process. Work through these checks in order.
-
Guide
Serial monitor empty? Match the baud rate and port
No text in the serial monitor? Check baud rate, port selection and whether Serial.begin actually ran before you print.
Keep your progress in one place
Create a free account to save what you are working on and see your results.