Introduction to the Arduino

Here will be explained about Arduino for beginners. For the programming hobbyists in hardware using microprocessor or microcontroller, the Arduino is an easy choice to make the program like the computer platform programming. 

On computer programming, relations with the hardware for input/output is not necessary to memorize the pin numbers of the hardware.  If you are on a microcontroller environment, must know the pin number that will be used for input/output. Furthermore it should understand the basic philosophy of how to treat the pin. 

Arduino is an IDE for programming microcontroller in order to develop the software as well as computer software development environment.  

Easily obtained using arduino IDE, among others:

  1. The programming language used was C / C + + or combined with the assembly. 
  2. Microcontroller pin numbers are known as fixed by classifying digital or analog channels. Any microcontroller with a label known for Dx to digital, analog to Ax, where x is the channel number. Thus you do not need to remember pin numbers on the microcontroller used.
  3. Programs that have been made using Arduino, can be easily applied to other microcontroller which is recognized by the Arduino. The program does not need to be changed, simply change the configuration of the microcontroller’s used.
  4. To add a new library can be built easily by using C / C + + or combined with the assembly. To integrate with the Arduino program, with enough to include the header of library that will be used. Thus very easy to integrate libraries made by the contributors for use by other users.
  5. Very easy to compile, there are two upload menu to compile and upload, verify menu to compile it. Library search process is done automatically.

How to start ?

Learn to start applying the Arduino, I recommend to you to have an Arduino board first. Avoid advance to make an Arduino board from microcontroller chip. For first, begin to learn programming with a simple application. Many types of Arduino board, more details you can click here.

Next, you must install the Arduino IDE, you can get for free by downloading here. I assume you have a nano to use a microcontroller ATmega328 board. More details about the specifications of this board you can see here.

 

Connect the Arduino with a USB interface on your computer, then run the Arduino IDE by clicking on the icon’s arduino. The first time you have to choose a board that suits you use. For that, click the menu: Tools-> Board.

Every time you change the type of the Arduino board, you must change the configuration of the appropriate board in the Arduino IDE. Most important is the type of microcontroller used and the frequency used must be matched on this configuration by typing menu.

Examples of program “blink” will appear as follows:

The logic of the program can be described as follows:

  1. There are two default functions, there are two setup() and loop() and must exist in the program. Setup () function as program initialization before the loop() function is executed.
  2. Loop() function is a substitute for the function main() in C programming language in general. The difference of this function will perform a continuous loop when the end of code is executed.
  3. The code in line 11 is initializing channel digital channel 13 (D13) as output. This channel is connected to the LED on the Arduino board type nano.
  4. At block loop () there are 4 lines of program code, line 15 is writing of logic one to D13. And will turn on LED, because there are pulldown series by resistor.
  5. Line 16, execution of time delay function with parameter passing 1000 as 1000ms or 1 second. This means that the LED will be turned on for 1 second.
  6. Line 17 is writing of logic low to D13. And will turn off LED.
  7. Line 18 similar with line 16, will executed time delay function about 1 second. This means tha LED will be turned off for 1 second.
  8. Go to line 15 again, because loop() will executed as looping.

To compile and upload to the board nano is very easy just click the upload icon.

please wait for video

Last updated by at .

Avatar of Bambang Siswoyo

About Bambang Siswoyo

I am a college lecturer since 1988 at UB (University of Brawijaya) in the electronics department. My experience: Applications of Microprocessor system, Applications of Control System, Applications of Field Programmable Gate Array, Computer Programming in computer instrumentations. My hobby: Music especially playing the saxophone, hiking and exploring the countryside.
This entry was posted in Arduino, Arduino, Tutorial and tagged , , , . Bookmark the permalink.

Leave a Reply

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

CAPTCHA Image

*

You may use these HTML tags and attributes: <a href="" title="" rel=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>