Programming the Arduino

This part is mostly the same no matter which Arduino you are going to program. You will be using the same software, for all of the Arduino devices on the marked.

You will be downloading the software from the Arduino The Arduino website. If you are going to use the Arduino Yun, you will need version 1.6.5 or above for it to work.

ArduinoProgramStart

What you see in the picture above is the Arduino programming interface. It is fairly simple to use. In the top you have 6 icons. From left it is “Verify” use to compile your program. Second is “Upload”, for uploading the program til the Arduino. If the program have note verified since last change, a verification process will run before the program is transferred to the Arduino. The next three are “New”, “Open” and “Save”. The last one is “Serial Monitor”, and it open a serial monitor which can be used to communication with your Arduino.

The first program

In order to verify that everything is working correctly, I would recommend you to start up one of the example programs stored in the Arduino software. If you go and click on “Files -> Examples -> Basic -> Blink” you will open the “Blink” example that looks similar to the following image:

ArduinoProgramBlink

This program will blink one of the LEDs on the Arduino board.

When the program is loaded, you need to specify which Arduino platform you are going to use. In the menu go to “Tools -> Board” and select “Arduino Yun” from the drop-down list. Then go to “Tools -> Port” and make sure that the Arduino you have connected to the PC is selected.

To compile and program you Arduino, then first press the “Verify” button to see that the program compiles as expected. When the compilation have ended successfully, then click “Upload”. The program will now be uploaded to the Arduino, and the LEDs on the Arduino board will start to blink. You have programmed your Arduino for the first time.

Afterwards you could play a little around with the other examples as well to get to know the programming language. Always try to understand what happens in the examples, as they are a source of inspiration for when you are starting up programming your own Arduino programs.