Install Arduino Driver: Difference between revisions

From Keyestudio Wiki
Jump to navigation Jump to search
No edit summary
 
(8 intermediate revisions by the same user not shown)
Line 1: Line 1:
== Installing Arduino Driver ==


Next, we will introduce the driver installation of UNO R3 development board. The driver installation may have slight differences in different computer systems. So in the following let’s move on to the driver installation in the WIN 7 system. <br>
Next, we will introduce the driver installation of UNO R3 development board. The driver installation may have slight differences in different computer systems. So in the following let’s move on to the driver installation in the WIN 7 system. <br>
Line 8: Line 10:
Then right-click on the device and select the top menu option (Update Driver Software...) shown as the figure below..   
Then right-click on the device and select the top menu option (Update Driver Software...) shown as the figure below..   
<br>[[Image:Driver 2.png|600px|frameless]]<br>
<br>[[Image:Driver 2.png|600px|frameless]]<br>
 
<br>
It will then be prompted to either “Search Automatically for updated driversoftware” or “Browse my computer for driver software”. Shown as below. In this page, select “Browse my computer for driver software”.
It will then be prompted to either “Search Automatically for updated driversoftware” or “Browse my computer for driver software”. Shown as below. In this page, select “Browse my computer for driver software”.
<br>[[Image:Driver 3.png|600px|frameless]]<br>
<br>[[Image:Driver 3.png|600px|frameless]]<br>
 
<br>
After that, select the option to browseand navigate to the “drivers” folder of Arduino installation.  
After that, select the option to browseand navigate to the “drivers” folder of Arduino installation.  
<br>[[Image:Driver 4.png|600px|frameless]]<br>
<br>[[Image:Driver 4.png|600px|frameless]]<br>
 
<br>
Click “Next” and you may get a security warning, if so, allow the software to be installed. Shown as below.  
Click “Next” and you may get a security warning, if so, allow the software to be installed. Shown as below.  
<br>[[Image:Driver 5.png|600px|frameless]]<br>
<br>[[Image:Driver 5.png|600px|frameless]]<br>
 
<br>
Once the software has been installed, you will get a confirmation message. Installation completed, click “Close”.  
Once the software has been installed, you will get a confirmation message. Installation completed, click “Close”.  
<br>[[Image:Driver 6.png|600px|frameless]]<br>
<br>[[Image:Driver 6.png|600px|frameless]]<br>
 
<br>
Up to now, the driver is installed well. Then you can right click “Computer” —>“Properties”—>“Device manager”, you should see the device as the figure shown below.   
Up to now, the driver is installed well. Then you can right click “Computer” —>“Properties”—>“Device manager”, you should see the device as the figure shown below.   
<br>[[Image:Driver 7.png|600px|frameless]]<br>
<br>[[Image:Driver 7.png|600px|frameless]]<br>
Line 26: Line 28:




== Example for Using Arduino IDE ==
==Example Use of ARDUINO IDE ==
When successfully installing the USB driver for UNO R3 board, you can find the corresponding serial port in Windows Device Manager.
 
Next, we will show you the program “Hello World!” displayed on the serial monitor of Arduino IDE. Here we use the Arduino 1.5.6 version.
'''STEP 1: Open Arduino'''<br>
In the previous, we have introduced the driver installation of UNO R3 development board. So this time let’s first have basic understanding of the development environment of ARDUINO. After master that, we are about to upload the program to Arduino board. <br>
First of all, click the icon of ARDUINO to open the [https://drive.google.com/open?id=10a_m2F2J3qAFQEN4-QPYMWzSygVU1E2S  ARDUINO development software], as the figure shown below. 
<br>[[Image:KS0313-6.png|600px|frameless]]<br>
 
 
'''STEP 2: Build Projects'''<br>
When open the Arduino software, you will have two options as below:<br>
*Build a new project<br>
*Open an exiting project example <br> 
If you want to build a new project, please select “File”→then click “New”, you will see the software interface as follows.<br>
<br>[[Image:KS0313-7.1.png|500px|frameless]][[Image:0313 箭头.png|600px|frameless]][[Image:KS0313-7.2.png|500px|frameless]]<br>
 
If you want to open an example project, please select File→Example→Basics→Blink. Shown below.<br>
<br>[[Image:KS0313-8.1.png|500px|frameless]][[Image:0313 箭头.png|600px|frameless]][[Image:KS0313-8.2.png|500px|frameless]]<br>
 
 
'''STEP 3: Select Arduino Board'''<br>
In order to avoid any mistakes during the process of uploading the code to the board, you must first select the correct Arduino board that matches the board connected to your computer.
Or you can directly open the Control Panel of your computer, then click to open Device Manager, you can check your board and port here. Shown as below.<br>
<br>[[Image:KS0313-9.png|700px|frameless]]<br>
Then come back to the Arduino software, you should click Tools→Board , select the correct board. Here in our tutorial we should select Arduino Uno. Shown as below.
<br>[[Image:KS0313-10.png|500px|frameless]]<br>


'''Sample Code as below:''' <br>
Copy and paste the following source code to Arduino IDE.
<pre>
int val;
int ledpin=13;
void setup()
{
Serial.begin(9600);
pinMode(ledpin,OUTPUT);
}
void loop()
{
val=Serial.read();
if(val=='R')
{
digitalWrite(ledpin,HIGH);
delay(500);
digitalWrite(ledpin,LOW);
delay(500);
Serial.println("Hello World!");
}
}
</pre>


Then,set the Board and COM port, shown below.
'''STEP 4: Select Serial Port'''<br>
<br>[[Image:Hello 1.png|500px|frameless]]<br>
Next, we should select the serial device of Arduino board. You can click Tools→Serial Port. If you want to find out your Arduino board, you could disconnect your Arduino board, then reopen the menu, you will see the Arduino board disappear. After that reconnect the board and select the serial port.<br>
<br>[[Image:Hello 2.png|500px|frameless]]<br>
You should select the correct Serial port that matches the port showed on the Device Manager of your computer. <br>
The figure shown below is only for your reference. <br>
Attach your Arduino board to your computer with the USB cable and check that the “Board Type” and “Serial Port” are set correctly.<br>
<br>[[Image:KS0313-11.png|500px|frameless]]<br>


If setting well the board and port, you can see it display on the bottom right corner, which is the same as the Device Manager display.
<br>[[Image:Hello 3.png|500px|frameless]]<br>


Then, click the verify to compile the sketch, if no mistake, click upload to upload the program. <br>
'''STEP 5: Upload the Code to Your Board'''<br>
Done uploading, open the serial monitor on the upper right corner and set the baud rate as 9600, enter an “R” and then click “Send”, finally you can see the D13 indicator on the UNO R3 board blinks once, and “Hello World!” is displayed on the serial monitor. Shown below.
Before showing you how to upload the code to your board, first of all let me introduce the function of each icon on the Tool bar of Arduino IDE. Look at the picture showed below.
<br>[[Image:Monitor2.png|500px|frameless]]<br>
<br>[[Image:KS0313-12.png|800px|frameless]]<br>
<br>[[Image:Hello 4.png|500px|frameless]]<br>
A- Used to verify whether there is any compiling mistakes or not.<br>
Congrats. Your first programming is done well!
B- Used to upload the sketch to your Arduino board.<br>
C- Used to create shortcut window of a new sketch.<br>
D- Used to directly open an example sketch.<br>
E- Used to save the sketch.<br>
F- Used to send the serial data received from board to the serial monitor. <br>

Latest revision as of 08:33, 24 July 2018

Installing Arduino Driver

Next, we will introduce the driver installation of UNO R3 development board. The driver installation may have slight differences in different computer systems. So in the following let’s move on to the driver installation in the WIN 7 system.
The Arduino folder contains both the Arduino program itself and the drivers that allow the Arduino to be connected to your computer by a USB cable. Before we launch the Arduino software, you are going to install the USB drivers.
Plug one end of your USB cable into the Arduino and the other into a USB socket on your computer.
When you connect UNO board to your computer at the first time, right click the icon of your “Computer” —>for “Properties”—> click the “Device manager”, under “Other Devices”, you should see an icon for“Unknown device” with a little yellow warning triangle next to it. This is your Arduino.

Driver 1.png

Then right-click on the device and select the top menu option (Update Driver Software...) shown as the figure below..
Driver 2.png

It will then be prompted to either “Search Automatically for updated driversoftware” or “Browse my computer for driver software”. Shown as below. In this page, select “Browse my computer for driver software”.
Driver 3.png

After that, select the option to browseand navigate to the “drivers” folder of Arduino installation.
Driver 4.png

Click “Next” and you may get a security warning, if so, allow the software to be installed. Shown as below.
Driver 5.png

Once the software has been installed, you will get a confirmation message. Installation completed, click “Close”.
Driver 6.png

Up to now, the driver is installed well. Then you can right click “Computer” —>“Properties”—>“Device manager”, you should see the device as the figure shown below.
Driver 7.png


Example Use of ARDUINO IDE

STEP 1: Open Arduino
In the previous, we have introduced the driver installation of UNO R3 development board. So this time let’s first have basic understanding of the development environment of ARDUINO. After master that, we are about to upload the program to Arduino board.
First of all, click the icon of ARDUINO to open the ARDUINO development software, as the figure shown below.
KS0313-6.png


STEP 2: Build Projects
When open the Arduino software, you will have two options as below:

  • Build a new project
  • Open an exiting project example

If you want to build a new project, please select “File”→then click “New”, you will see the software interface as follows.

KS0313-7.1.png0313 箭头.pngKS0313-7.2.png

If you want to open an example project, please select File→Example→Basics→Blink. Shown below.

KS0313-8.1.png0313 箭头.pngKS0313-8.2.png


STEP 3: Select Arduino Board
In order to avoid any mistakes during the process of uploading the code to the board, you must first select the correct Arduino board that matches the board connected to your computer. Or you can directly open the Control Panel of your computer, then click to open Device Manager, you can check your board and port here. Shown as below.

KS0313-9.png
Then come back to the Arduino software, you should click Tools→Board , select the correct board. Here in our tutorial we should select Arduino Uno. Shown as below.
KS0313-10.png


STEP 4: Select Serial Port
Next, we should select the serial device of Arduino board. You can click Tools→Serial Port. If you want to find out your Arduino board, you could disconnect your Arduino board, then reopen the menu, you will see the Arduino board disappear. After that reconnect the board and select the serial port.
You should select the correct Serial port that matches the port showed on the Device Manager of your computer.
The figure shown below is only for your reference.
Attach your Arduino board to your computer with the USB cable and check that the “Board Type” and “Serial Port” are set correctly.

KS0313-11.png


STEP 5: Upload the Code to Your Board
Before showing you how to upload the code to your board, first of all let me introduce the function of each icon on the Tool bar of Arduino IDE. Look at the picture showed below.
KS0313-12.png
A- Used to verify whether there is any compiling mistakes or not.
B- Used to upload the sketch to your Arduino board.
C- Used to create shortcut window of a new sketch.
D- Used to directly open an example sketch.
E- Used to save the sketch.
F- Used to send the serial data received from board to the serial monitor.