Start with three small Arduino projects: blink an LED, read a button, then display temperature and humidity in the Serial Monitor. Each adds one idea without requiring a finished enclosure or a permanent soldered circuit.
Board used in these instructions: Arduino UNO R3, with 5V logic, or a documented equivalent. Other boards can have different pin assignments, voltage limits, and software requirements. Check those before copying the wiring. These examples are built from the official Arduino documentation and component datasheets linked in the references below.
What you’ll need: an UNO R3, a suitable USB data cable, a breadboard, jumper wires, a conventional red indicator LED, a 1kΩ quarter-watt resistor, a normally open momentary pushbutton, and a DHT11 or DHT22 sensor rated for this 5V setup. Have a 10kΩ resistor for the sensor data pull-up unless its module already provides one. Install the Arduino IDE from Arduino’s official site.
Disconnect USB and any other power before changing wiring. Map the breadboard rows and split power rails first. Select the board and its port in the IDE; for an UNO R3 use the Arduino AVR Boards support package. Begin with USB power only, and never connect 5V to a board input that is rated only for 3.3V.


Project 1: The blinking LED (“Hello, World” of hardware)
Every programmer starts with “Hello, World.” Every Arduino builder starts with a blinking LED. It teaches you the two essentials: wiring an output and uploading code.
Wiring:
- With power disconnected, connect digital pin 13 → 1kΩ resistor → LED anode (usually the longer uncut lead).
- Connect the LED cathode (usually the shorter lead or flat package edge) → GND. Keep the two LED legs in separate, unconnected rows and confirm polarity against the LED’s documentation.
The external LED needs its series resistor. With an assumed 2V LED drop, 1kΩ gives about 3mA from 5V; check the LED’s specifications. Arduino’s UNO R3 pinout lists a 20mA limit per I/O pin, which is not a current target. Motors and high-power LEDs need suitable external drivers. You can first try the built-in LED on pin 13 with no external circuit, then disconnect power to add your LED.
Code:
void setup() {
pinMode(13, OUTPUT); // Tell the Arduino pin 13 is an output
}
void loop() {
digitalWrite(13, HIGH); // Turn the LED on
delay(1000); // Wait one second
digitalWrite(13, LOW); // Turn the LED off
delay(1000); // Wait one second
}
Upload the sketch. The LED should stay on for one second, then off for one second: a complete cycle takes two seconds. If upload fails, check the board selection, port, and USB data cable. If the built-in LED works but your external LED does not, disconnect power and check polarity, the resistor, and breadboard rows.
What you learned: pinMode configures pins, digitalWrite controls them, and loop() repeats forever. That’s the skeleton of nearly every Arduino program.
Project 2: Button-controlled LED (your first input)
Outputs are fun, but projects get interesting when they react to the world. This one adds a pushbutton that turns the LED on only while pressed.
Wiring:
- Keep the LED circuit from Project 1.
- Connect digital pin 2 and GND to two switch terminals that are open when released and connected only while pressed. A common four-leg tactile switch has two internally connected pairs: do not choose both legs of the same pair. Check its connection diagram or use continuity mode with the switch disconnected from power.
- That’s it — no extra resistor needed. We’ll use the Arduino’s built-in pull-up resistor.
Code:
void setup() {
pinMode(13, OUTPUT);
pinMode(2, INPUT_PULLUP); // Button pin, with internal pull-up enabled
}
void loop() {
int buttonState = digitalRead(2);
if (buttonState == LOW) { // Button pressed (pull-up means pressed = LOW)
digitalWrite(13, HIGH);
} else {
digitalWrite(13, LOW);
}
}
With INPUT_PULLUP, an open button reads HIGH and a pressed button reads LOW. If the LED stays on, disconnect power and check for a permanent connection between pin 2 and GND, including the wrong switch legs or breadboard row. If it never lights, check the switching pair and the LED circuit. This example reads the current state; a future button counter or toggle will need debouncing so one press is not counted several times.
What you learned: digitalRead reads inputs, INPUT_PULLUP saves you a resistor, and if/else makes decisions. You’ve just built the logic behind every button-controlled gadget.

Project 3: Temperature and humidity in the Serial Monitor
A DHT11 or DHT22 can provide basic temperature and humidity readings. This project prints them on your computer; it does not use a separate LCD. Match the code to the sensor you actually own, and treat it as a learning project rather than a calibrated measuring instrument.
Wiring:
- DHT sensor VCC pin → Arduino 5V
- DHT sensor GND pin → Arduino GND
- DHT sensor DATA pin → Arduino digital pin 4
- For a bare sensor, add a 10kΩ resistor between DATA and VCC. For a breakout module, check whether a pull-up resistor is already fitted.
Confirm the pinout before connecting power: bare four-pin sensors and three-pin modules are not interchangeable by position. The common bare DHT package uses VCC, DATA, an unused pin, and GND; verify orientation using its documentation and leave the unused pin disconnected. Do not infer connections from wire color.
Code: In Library Manager, install DHT sensor library by Adafruit and its Adafruit Unified Sensor dependency (accept dependency installation if offered). Set DHTTYPE to DHT11 or DHT22 as appropriate. Then:
#include <DHT.h>
#define DHTPIN 4
#define DHTTYPE DHT11 // Change to DHT22 if that's your sensor
DHT dht(DHTPIN, DHTTYPE);
void setup() {
Serial.begin(9600);
dht.begin();
}
void loop() {
delay(2000); // DHT sensors need ~2 seconds between readings
float temp = dht.readTemperature();
float humidity = dht.readHumidity();
if (isnan(temp) || isnan(humidity)) {
Serial.println("Failed to read sensor — check wiring");
return;
}
Serial.print("Temperature: ");
Serial.print(temp);
Serial.print(" C | Humidity: ");
Serial.print(humidity);
Serial.println(" %");
}
Open the Serial Monitor at 9600 baud. The sketch waits two seconds between attempts; successful readings should appear at roughly that interval. If it reports a failure, disconnect power and check the sensor type, pinout, shared GND, DATA connection, and pull-up. A missing Adafruit_Sensor.h error means the Unified Sensor dependency needs installing. Keep the sensor dry and away from heat sources while comparing readings.
What you learned: libraries extend what Arduino can do, sensors need time between readings, and the Serial Monitor is your best debugging friend.
Where to go from here
You now understand outputs, inputs, and sensors — the three building blocks of physical computing. Natural next steps:
- Combine them: make the LED change color based on temperature (you’ll need an RGB LED).
- Add a display: a cheap 16×2 LCD shows readings without a computer attached.
- Go wireless: an ESP32 can run suitable Arduino-framework sketches, but uses different board support and 3.3V GPIO limits. Adapt the circuit first; notifications also need network and service software.
When troubleshooting, separate upload errors from wiring errors and change one thing at a time. Save a working sketch before adding the next component. For help mapping rows and rails, see Breadboard Basics.
Official references
- Arduino Blink — external LED current limiting and timing.
- Arduino UNO R3 pinout — pins and current limits.
- Arduino digital input pull-up tutorial — HIGH when open, LOW when grounded.
- Omron B3F tactile-switch datasheet — an example of internally connected terminal pairs; check your own switch.
- Adafruit DHT sensor wiring and Arduino library setup — pull-up, pinout, sensor type, and dependencies.
Related Reading
- 5 Raspberry Pi Projects for Beginners to Try This Weekend
- ESP32 vs Arduino: Which Microcontroller Should You Choose?
- How to Control Motors with Arduino: DC Motors, Servos, and Stepper Motors
- Raspberry Pi Pico for Beginners: Your First MicroPython Projects
The DIY Geek — hands-on guides for electronics, 3D printing, woodworking, and smart home.