Experiment 1: Basic LED Blinking
Objective: Create a simple program to blink an LED at regular intervals.
Components:
• Arduino UNO R3 DIP
• Breadboard
• Jumper Wire All type
• Red colour LED
• 220 Ω Resistor
Steps to Perform the Experiment:
A. Set Up the Hardware
1. Place the LED on the Breadboard:
- Insert the LED into the breadboard. The longer leg (anode) is the positive terminal, and the shorter leg
(cathode) is the negative terminal.
2. Connect the Resistor:
- Place a resistor in series with the LED's anode (longer leg). Connect one end of the resistor to the LED's
anode and the other end to a jumper wire.
3. Connect the LED to the Arduino:
- Anode (longer leg): Connect the free end of the resistor to digital pin 13 on the Arduino using a jumper wire.
- Cathode (shorter leg): Connect to GND on the breadboard using a jumper wire.
4. Set Up the Breadboard:
- Connect the Arduino's GND pin to the breadboard's GND rail to complete the circuit.
B. Upload the Code to the Arduino
1. Open the Arduino IDE on your computer.
2. Connect your Arduino UNO to your computer using the USB cable.
3. Write the code into the Arduino IDE.
4. Select the correct board and port in the Arduino IDE (Tools > Board > Arduino UNO, Tools > Port > your
port).
5. Click the "Upload" button to upload the code to the Arduino.
C. Testing the Setup
1. After uploading the code, the Arduino should start running the program.
2. The LED should blink on and off at defined intervals.
3. The LED will stay on for 1 second, then turn off for 1 second, repeatedly. (Assuming values defined in code)
Robo%cs & A.I. – Class IX | SMC Prayagraj