arduinouno_r3_pinouts_600.png

Getting Started with Arduino Uno

Good! You are here because you wanted to use Arduino. 1st thing 1st, you will need the necessary tools to get started.

Arduino Main Board

ArduinoUno R3 Pinouts 600

Currently, there are > 10 types of Arduino main board in the market including 3rd party, compatible version, etc. We will not cover all. I will focus on Arduino Uno. Other types of Arduino main board have the basic operation, with a little tuning and exploring, I am sure you can get the hang of it. So get the Arduino Uno (lastest version is Rev3). If you have any problem, welcome to discuss in our technical forum. You can also refer to :

USB cable

USB cable is used to connect Arduino Main Board to the computer/laptop for loading program, for power and also for serial communication. Arduino UNO and earlier version uses USB B type cable. Do check if the Arduino board comes with the cable, else get it! BTW, USB B type cable is commonly used on USB printers, if you have one, just use it temporary. If you are getting the latest version of Arduino, you will need the USB Micro B cable.

Arduino IDE

Arduino IDE is the software tool needed to write sketch (code), and load into the Arduino main board. Please go to Arduino website at arduino.cc, under Download, please download the corresponding IDE base on your Operating system (Windows, Mac OS X, Linux). This is the location to download the latest version of Arduino IDE.

Arduino 1.0

Unzip the downloaded file.

Arduino Main Board to Computer

Now, since this is your 1st time, it is always going to be painful, right? BTW, I will be showing the steps using Windows XP only 🙂 Connect the B type end of USB cable to Arduino UNO, and the other end to the computer/laptop USB port. Arduino UNO will automatically use the power from USB to start up. The green LED (ON) on Arduino UNO should be ON and Red LED (L) will blink at 1 second rate. 1st time user, you will need to install the USB driver for communication. You should also hear sound from the computer and a little popup message box at the bottom right corner of the screen saying Found New Hardware…..Arduino UNO…. you will need to install the driver 🙂

founduno

The Found New Hardware Wizard will appear and please select No, not this time and click Next >

foundnewhardware

Select Install from a list of specific location (Advanced) in the next screen. Click Next >

abstract

The next screen, make sure you select Include this location and browse to the Arduino IDE folder that you just downloaded and upzipped. Select the drivers folder, and click OK. DO NOT go inside FDTI USB Driversfolder, that is for Arduino Duemilanove and older version.

unodriverloc

The wizard should start searching for necessary files and install the driver, you might get this warning message pop up, just click Continue Anyway.

unowarn

And it should install successfully and you will get this, click Finish.

usbserialportfinished

You might need to reboot/restart the computer to get the driver working properly, don’t worry, it’s only a one time work! After the computer reboot, please make sure the Arduino is plugged to the computer through the USB cable. where the green LED is ON. We would like to know which COM number is the Arduino UNO connected to. Go to the Device Manager (from the Start Menu, select Settings -> Control Panel. Double Click on System and select Hardware tab. Then click on Device Manager).

devicemanager

Look for an entry under Ports (COM & LPT) that shows USB Serial Port (COM”X”) where  X is a decimal number from 1 to 100. Seriously, I have seen COM72 before! Anyway the X can be any number and it should be a unique number and we need it in Arduino IDE later. So in this case, the COM number is 3. You will need to select the correct COM number to load program/sketch into Arduino UNO later. If you don see any USB Serial Port, unplug USB cable and plug in again. Good the pain is over 🙂 Let’s move to the fun part.

Hello World in Arduino – LED blinking

Open the folder Arduino that you download and unzipped, you should see a file named arduino.exe, double click it, Arduino IDE will appear, it may take a while to load, ~ 10 seconds.

arduino exe

This is the Arduino IDE:

Arduino 1.0

Make sure the Arduino UNO is connected to computer with the USB cable. Arduino IDE support many Arduino main board, including UNO 🙂 We will need to select the correct board and microcontroller. Goto Tools -> Board -> Arduino Uno, click it.

Arduino Choose Board

Now, make sure Arduino IDE knows which COM Port the Arduino Uno is connected to. Goto Tools -> Serial Port -> COM?, it depends on the COM number you checked from the device manager, make sure you select the same COM number. Remember, the number might be different when you use different USB port, change different Arduino board and different computer. Again, mine is COM3. Do not follow my COM number, choose yours.

Arduino Choose COM

The settings will appear at the bottom right corner of Arduino IDE.

Arduino Uno on COM

Now, you are ready to load the 1st example code, Blinking 🙂 Goto File -> Examples -> Basic -> Blink, click it. The example sketch/program will appear in a new Arduino IDE window, don’t worry, it’s perfectly normal. You can ignore the empty Arduino IDE that appeared earlier. You can close it or leave it. We will work on the new Arduino IDE with Blink sketch.

2 Arduino IDE

You can click the upload icon, Arduino IDE will compile the sketch and upload into Arduino UNO connected to your computer (if there is no error), further run the sketch on Arduino UNO. You will just have to wait until the message box say Upload Done and look at the Arduino Uno. The red LED will Blink at 1 second rate.

Upload Icon

OK, I cheated you 🙂 The Red LED is blinking from the beginning, loading the new sketch does not change anything 🙂 No, I didn’t cheat you, because Arduino UNO comes pre-loaded with bootloader that will blink the Red LED at 1 second rate 🙂 So we are loading the program which is already running, that’s why you didn’t see the difference. No worries, we will make the changes. Scroll down the program/sketch, in the loop function. Modify the value from delay(1000) to delay(100), for both the delay. Click on the Upload icon and sit back, wait until it is done uploading.

Arduino Change Delay

Now, look at the Red LED blinking rate, it has become faster 🙂 You have successfully load an example code/sketch and modify it. Hurray! You can try the other examples, but most will require additional shields or components. We will come out with more tutorials, stay tuned! We have another version of Arduino tutorial here.

Buy

5 thoughts on “Getting Started with Arduino Uno

  1. I am a completely new to programming of any type. I recently purchased Arduino Uno, set it up and it worked great with the examples provided. I need to make programs for other simple applications, where do I find the definitions and how to program? I repeat, I am an absolute beginner in all types of programming.
    Appreciate some guidance. Regards,
    Nazih

Leave a Reply

Your email address will not be published. Required fields are marked *