Learn How To Use An Arduino

https://www.youtube.com/watch?v=PWKYYJu4yVw

The easiest way to make and control your own electronics is through a device called an “Arduino”. This video shows you the basics of getting started with it.

Download The Arduino Software

Obtaining An Arduino

Arduino’s can be purchased online at varying prices. Amazon or Ebay will vary greatly in prices. The price also depends on the version of Arduino that you purchase. The current version is the Uno and the older version is the Duemilanove. Other types of Arduino exist as well, such as an Arduino that you can build yourself, Arduino Nano, Lilypad, Arduino BT and a lot more.

Version Price
Arduino Uno $29.96

Installing the Software

You can download the Arduino software from here. It’s available for Windows, Mac and Linux. It downloads in a zip file, so you will need archiving software such as 7-zip to unzip it. Then you will need to just click on the “Arduino” program icon to launch the program.

Arduino Uno board

The first thing you want to do is check to make sure the program is set to match the Arduino board that you are using. You can find out the type of board you have by looking on either the top or the bottom of the board. Then go to Tools>Boards from the menu and select your board.

Also you need to make sure the correct serial port is selected. This section is also accessed from the Tools menu. If the option is greyed out, then that means your Arduino board is not connected properly. You can find some common troubleshooting techniques below. For most new computers that only have one Arduino connected to them, there will most likely only be one serial port to select.

Creating A Program

The Arduino uses C/C++ programming language, so if you’re familiar with those languages you’re already way ahead of the curve. The Arduino program basically allows you to write a program, upload it to your Arduino device and save it for later use. The programs tell the Arduino what to do, how to control things, what information to retrieve, etc. You can find lots of sample programs by going to File > Examples. The sample program used in the video can also be found at File > Examples > 01.Basics > Blink. The final code can be seen here:

int led = 13;

void setup() {
  pinMode(led, OUTPUT);     
}

void loop() {
  digitalWrite(led, HIGH);
  delay(1000);
  digitalWrite(led, LOW);
  delay(1000);
}

As you become more advanced with creating programs and adding devices, you will need to start using different Arduino libraries. The make is easy to extend the functionality of the Arduino in amazing ways.

Connecting Devices to the Arduino

The sky is the limit when it comes to what can be connected to the Arduino. But you must know how to connect them. There are lots of input/output ports on the Arduino. Some are analog and some are digital. Please refer to the online documentation to know which pins are best for your project.

Powering the Arduino

The Arduino runs off of 5 volts, so whenever it’s connected to your computer via USB, it can power itself. If you wanted to run it separately from your computer, then you would need to supply it with 5 volts via a battery pack or by wiring 5 volts of current through the Arduino’s power pins.

Troubleshooting

Serial Port option is greyed out

This generally means that your Arduino board either is not connected properly or not installed properly. Check your USB cord and the connection to make sure that it is connected properly. On Windows 7 and some Vista machines, you will need to install the drivers for the Arduino before it works. To do this, open up your Device Manager (Start>Search>”Device Manager”) and look for any device that has an exclamation point or question mark beside it. Right click on that device and choose “Update Driver”. Then browse to the “drivers” folder in your Arduino installation folder. After clicking next, it should install the drivers.

Program does not upload to Arduino

There three main reasons this will happen:

  1. The board is not connected.
  2. The board is not installed correctly (see above).
  3. The board you are using is different from the board selected in Tools > Boards.

The LED does not blink

Please check the previous troubleshooting questions to see if they resolve this problem before continuing. If it still is not working, then the LED is not connected properly. Make sure the positive leg (the longer LED leg) is connected to port 13 and the negative leg (on the same side as the flat part of the LED) is connected to GND. It will not work in any other ports due to port 13 being the only one that has a built-in resistor.

Help support my channel: http://www.patreon.com/tinkernut Follow Tinkernut! Google + Facebook Twitter

6 thoughts on “Learn How To Use An Arduino

Leave a Reply