Aduino coding series #2 : Arduino IDE Download and Install

Words
1110
Reading
5 min
Listen
Play
8y

Fig_01.png

Arduino coding easy to use with a simple knowledge of electronic circuits and coding, starts with the installation of the Arduino editor on his computer, along with some electronic components, jumper wiring, and bread board preparation.

Arduino coding uses a few components and sensors in the beginning to create a simple electronics circuit that connects to the Arduino board, as well as writing, compiling and uploading code in the Arduino editor. Let's try it.

If you go through the basic steps, you will find that you yourself have the ability to create your own creative projects based on your interest.

The electronics side does not require much complexity. Ohm's law that we have already heard or learned seems to be the most difficult theory in Arduino electronics. Also, keep in mind the very simple electrical safety instructions such as connecting the + or - of the battery or the power source not to cause the electric spark.

Install

The following process looks a little long, but the actual downloading and installation work is so fast enough for few minutes. However, I have added a detailed explanation because there may be problems during the job.

When you enter the SOFTWARE tab, you will see two versions of the Arduino editor. One is the online version and the other is the downloadable Arduino IDE version 1.8.5.

Fig_02.png

Just download this 1.8.5 version. It is recommended to use Microsoft Internet Explorer. I have experienced unknown download error probably due to the use of Google Chrome. If your computer is Windows 7 or higher, click Windows Installer: for windows XP and up button.

Click on the JUST DOWNLOAD button under the price list of donation.

Fig_03.png

When the download is complete, go to the download directory of your desktop user director on the background screen. You can find arduino 1.8,5-windows.exe file

Fig_04.png

Most Windows PC users use hard disk formatted as C: and D:, so to make it easier to use and store data, you need to install arduino 1.8,5-windows.exe file at the D: directory instead of C:.
After moving to the D: directory, double-click the arduino 1.8.5-windows.exe file to run it.

Select the directory D: on your PC by clicking the Browse button while referring to the screen below. Press the Install button.

Fig_05.png

At the end of the installation, Adafruit Industries will ask whether you want to install it. Adafruit is closely related to the field of Arduino coding, so please press the install button to finish.

You will see the Arduino directory installed in your local directory D as shown. Protect the Arduino code stored in D: even in the worst case of blowing C: on your computer.

Fig_06.png

Let's look at the Arduino directory layout.
Pay attentio to the libraries directory. When you proceed with the arduino coding, you need to register a new user application library in the current directory according to your needs.
However, if you use the existing libraries directory and accidentally edit or delete the contents, you may encounter several unknown errors. Just leave them as they are. Do not touch any more!

Fig_08.png

Alternatively, it is very convenient to make a user defined, for instance, “prog_ex” directory. Here we store exmple codes we edited. Additonally, this directory can be used to save and to register new libraries needed for application codings.

If the Arduino editor requires for you to register new specific library, you can designate the path to the inside of, for example, “prog_ex”.
applications under the name prog_ex, and if you need to register a new library.

This way may be very helpful when you change your computer working with Arduino to others. If you just carry the directory, so called. “prog_ex”, after moving to other computer, of course, when compiling and uploading application code, the library path must be specified again at that time. That’s it.

In above Arduino directory, drivers manage the USB COM port assigned by Arduino via the Device Manager when connecting to a USB port on a PC using a USB cable.

The standard USB driver is provided by default when the Arduino editor is installed. However, COM port recognition problems can frequently occur on Chinese-made Arduino compatible boards using CH340G FTDI chips. Therefore, if you install the CH340G driver additionally, you can compile and upload arduino codes without any problems. The standard

USB driver and the CH340G driver do not conflict with each other and are automatically recognized by the PC.

Users do not need to touch the java directory. but it is necessary for users to update periodically the Java when is required by Java. It may influence the update of Arduino version.

Execution

Click on the Arduino icon to run it, then select the new file in the File tab and the following screen appears.

Although user has not started coding yet, but there is a set of coding typed. This background type code is called bare minimum. Although there is no execution commands, it satisfies a minimal form of arduino code, so it can be compiled and uploaded to the microcontroller, Arduino board.
However, it is indicated that after uploading, there is no special communication with the PC's Arduino editor or serial monitor. This coding is also essential for the firmware installation of the ESP8266 ESP-01 module to provide wireless Wi-Fi capability to Arduino.

Fig_10.png

In the above figure, the black console window displays the error that is displayed during compile uploading.

The serial monitor helps to monitor the output of the Arduino code in the PC by serial communication via the USB cable since Arduino does not have a display as well as a keyboard.

Arduino code layout

The Arduino code consists of three parts as shown below.
Header area includes calling libraries, declaring global variables of interger or float type as well as class commands.

In setup(), the basic baud rate setting and the input/output mode of Arduino data pins must be set. Besides, once a setting is made within setup(), further setting is not possible in loop() statements.

Fig_11.png

In the loop () statement, which is repeated infinitely, sensor data measurement as well as ON-OFF output of the installed LED can be performed. The loop () statement will be stopped when the power is removed, and if the power turns on again, the code that was previously cuploaded will continue to run.

If Arduino board, bread board and LEDs and jumper lines have been purchased, you are ready to start Arduino coding.

Plug the USB cable into USB COM port of PC!

For purchasing of Arduino board, and parts, please refer to the following previous blog.

Aduino coding series #1 for those who are the beginner, "Parts Purchasing Guide“
https://steemit.com/howto/@codingart/aduino-coding-series-1-for-those-who-are-the-beginner-parts-purchasing-guide

Aduino coding series #2 : Arduino IDE Download and Install | Ecency