Arduino UNO Sample Project
Arduino UNO Sample Project
Arduino UNO Sample Project
Arduino Projects
In this tutorial, we’re going to help you create a few simple arduino projects
that are perfect for beginners. These basic projects will help you understand
how to set up the Arduino software and then connect the components to
perform a specific action.
If you’re completely brand new to Arduino, make sure you download our free
ebook below. This guide was created for the absolute beginner and will help
you to understand the Arduino board along with its parts and components.
Need the parts? Get the Arduino Starter Kit w/ Project Ebook
You can find the latest version of this software on the Arduino IDE download
page.
To install the software, you will need to click on the link that corresponds with
your computer’s operating system.
Arduino IDE
Once the software has been installed on your computer, go ahead and open it
up. This is the Arduino IDE and is the place where all the programming will
happen.
Take some time to look around and get comfortable with it.
1. Menu Bar: Gives you access to the tools needed for creating and saving
Arduino sketches.
2. Verify Button: Compiles your code and checks for errors in spelling or
syntax.
3. Upload Button: Sends the code to the board that’s connected such as
Arduino Uno in this case. Lights on the board will blink rapidly when
uploading.
4. New Sketch: Opens up a new window containing a blank sketch.
5. Sketch Name: When the sketch is saved, the name of the sketch is
displayed here.
6. Open Existing Sketch: Allows you to open a saved sketch or one from
the stored examples.
7. Save Sketch: This saves the sketch you currently have open.
8. Serial Monitor: When the board is connected, this will display the serial
information of your Arduino
9. Code Area: This area is where you compose the code of the sketch that
tells the board what to do.
10. Message Area: This area tells you the status on saving, code compiling,
errors and more.
11. Text Console: Shows the details of an error messages, size of the
program that was compiled and additional info.
12. Board and Serial Port: Tells you what board is being used and what
serial port it’s connected to.
Once the board is connected, you will need to go to Tools then Board then
finally select Arduino Uno.
Next, you have to tell the Arduino which port you are using on your computer.
To select the port, go to Tools then Port then select the port that
says Arduino.
Arduino Project 1: Blink an LED
It’s finally time to do your first Arduino project. In this example, we are going
to make your Arduino board blink an LED.
Need the parts? Get the Arduino Starter Kit w/ Project Ebook
Step 1 – Insert black jumper wire into the GND (Ground) pin on the Arduino
and then in the GND rail of the breadboard row 15
Step 2 – Insert red jumper wire into pin 13 on the Arduino and then the other
end into F7 on the breadboard
Step 5 – Bend both legs of a 220 Ohm resistor and place one leg in the GND
rail around row 4 and other leg in I4
Step 6 – Connect the Arduino Uno to your computer via USB cable
The built-in LEDs on the Arduino board will flash rapidly for a few seconds and
then the program will execute. If everything went correctly, the LED on the
breadboard should turn on for a second and then off for a second and
continue in a loop.
Congrats! You just completed your first Arduino project. Troubleshooting – If
you ran into a problem don’t give up, check out the troubleshooting section
below for common problems.
Need the parts? Get the Arduino Starter Kit w/ Project Ebook
Step 2 – Connect the blue jumper wire from the GND rail on the breadboard
near A17 to H19
Step 3 – Connect the red jumper wire from the power rail on the breadboard
around row A27 to H26
Step 4 – Connect the green jumper wire from pin 2 on Arduino to J24 on the
breadboard
Step 5 – Place one leg of a 10k Ohm resistor in G19 and the other leg in G24
Step 6 – Place the pushbutton switch into F24, F26, E24 and E26
Step 7 – Place one leg of a 220 Ohm resistor in D5 and the other leg in G5
Step 8 – Insert the short leg of the LED in the GND rail around A5 and the long
leg in B5
Step 9 – Connect the black jumper wire from pin 13 on the Arduino to I5 on
the breadboard
Step 10 – Connect the red jumper wire from 5V on the Arduino to power rail
(+) near A8
Step 11 – Connect the Arduino Uno to your computer via USB cable
In order to use a switch, we have to load the file called “Button” which can be
found here: File > Examples > Digital > Button
Now you should have a fully coded button sketch that looks like the image
below.
Next, you need to click on the verify button (check mark) that’s located in the
top left of the IDE box. Once it says “Done Compiling” you are ready to
upload it. Click the upload button (forward arrow) to send the program to the
Arduino board.
Press the button switch on the breadboard and you should be able to turn on
and off the LED as shown in the below video.
Troubleshooting
If you are having any problems with the projects we did, make sure the
following has been checked.
1. Verify the LED is actually functional. Use a 3v coin cell battery and
connect the LONG leg of the LED to the (+) and SHORT leg to the (-) of
the battery.
2. Verify the correct leg of the LED is connected properly. LONG leg to
positive and SHORT leg to negative.
3. Make sure the Arduino IDE shows the correct board. Go
to Tools > Board then select Arduino Uno.
4. Make sure the Arduino IDE shows the correct port. Go
to Tools > Port then select the port that says Arduino.
5. Verify all component connections are secure with the Arduino board
and breadboard.
Resources
This instructable and LED calculator will help you determine which size
resistor to use for projects involving LEDs
This resistor color code calculator will help you decode what size resistor
you have based on the color bands