Robot Arm Project 1: Getting Started with ARDUINO

Posted by Fiona Su on

1) Core Part of Robot
When it comes to using the REV4 as core of our robot, the REV4 is the best board to get started with electronics and coding. If this is your first experience tinkering with the platform, the REV4 is the most robust board you can start playing with.


Well, let's at first have a look at this REV4 board.

KS0341 引脚标图.jpg

KS0313 5.1-1.png
USB Connection
Arduino board can be powered via USB connector. Or you can program the board via the USB port.
KS0313 5.1-2.png
DC Power Jack
Arduino board can be supplied with power from the DC power jack
KS0313 5.1-3.png
Voltage Regulator
To control the voltage provided to the Arduino board, as well as to stabilize the DC voltage used by the processor and other components.
KS0313 5.1-4.png
Crystal Oscillator
How does Arduino calculate time? by using a crystal oscillator. The number printed on the top of the Arduino crystal is 16.000H9H. It tells us that the frequency is 16,000,000 Hertz or 16MHz.
KS0313 5.1-5.png
Arduino RESET
You can reset your Arduino board, for example, start the program from the very beginning. Firstly, use the RESET button(17). Or you can connect an external reset button to Arduino pin 5 labeled RESET
KS0313 5.1-6.png
Pin Header(3.3V,5V,GND,Vin

KS0313 5.1-7.png3.3V - provides 3.3V output voltage
KS0313 5.1-8.png5V - provides 5V output voltage
Using 3.3 volts and 5 volts, most components can normally operate with Arduino board together.
KS0313 5.1-9.pngGND(Ground pins)- two GND headers on Arduino, each of which can be used for circuit ground.
KS0313 5.1-10.pngVin - You can supply an external power (like AC power supply) through this pin to Arduino board.

KS0313 5.1-11.png
Analog Pins

Arduino REV4 board has 6 analog inputs, labeled A0 through A5. These pins can read the signal from analog sensors (such as humidity sensor or temperature sensor), and convert it into the digital value that can read by microcontrollers)

KS0313 5.1-12.png
Each Arduino board has its own microcontroller. You can regard it as the brain of your board.
The main IC (integrated circuit) on the Arduino is slightly different from the panel pair. Microcontrollers are usually from ATMEL. Before you load a new program from the Arduino IDE, you must know what IC is on your board. This information can be checked at the top of IC.
KS0313 5.1-13.png
ICSP (In-Circuit Serial Programming) Header
In most case, ICSP is the AVR, an Arduino micro-header consisting of MOSI, MISO, SCK, RESET, VCC, and GND.It is often called the SPI (serial peripheral interface) and can be considered an "extension" of the output.In fact, slave the output devices under the SPI bus host.
KS0313 5.1-14.png
Power LED Indicator
Powering the Arduino, LED on means that your circuit board is correctly powered on. If LED is off, connection is wrong.
KS0313 5.1-15.png
Onboard you can find two labels: RX(receive ) and TX (transmit)
First appear on digital pin 0 and 1 for serial communication;
Besides, the RX LED on the board will flash in different speed when serial data is being transmitted. The flash speed depends on the baud rate set by board. And RX LED will also flash during the receiving process.
KS0313 5.1-16.png
Digital I/O
Arduino REV4 has 14 digital input/output pins (of which 6 can be used as PWM outputs). These pins can be configured as digital input pin to read the logic value (0 or 1). Or used as digital output pin to drive different modules like LED, relay, etc. The pin labeled “〜” can be used to generate PWM.
KS0313 5.1-17.png
Reference voltage( 0-5V) for the analog inputs. Used with analogReference().

Installing Arduino IDE

When you get the REV4 development board, first you should install the software and driver of Arduino. You can see all the Arduino software versions from the link below:
Or you can browse the ARDUINO website at this link,, pop up the following interface.


Then click the SOFTWARE on the browse bar, you will have two options ONLINE TOOLS and DOWNLOADS.


Click DOWNLOADS, it will appear the latest software version of ARDUINO 1.8.5 shown as below.


In this software page, on the right side you can see the version of development software for different operating systems. So ARDUINO has a rather powerful compatibility. You should download the software that is compatible with the operating system of your computer.
In our project, we will take WINDOWS system as an example here. There are also two options under Windows system, one is installed version, the other is non-installed version. For simple installed version, first click Windows Installer, you will get the following page.



This way you just need to click JUST DOWNLOAD, then click the downloaded file to install it.
For non-installed version, first click Windows ZIP file, you will also get the pop-up interface as the above figure.
Click JUST DOWNLOAD, and when the ZIP file is downloaded well to your computer, you can directly unzip the file and then click the icon of ARDUINO program to start it.

Installing Arduino (Windows)
Install Arduino with the exe. Installation package


Click“I Agree”to see the following interface.


Click “Next”. Pop up the interface below.


You can press Browse… to choose an installation path or directly type in the directory you want.
Then click “Install” to initiate installation.


Wait for the installing process, if appear the interface of Window Security, just continue to click Install to finish the installation.


All right, up to now, you have completed the Arduino setup! The following icon will appear on your PC desktop.


Double-click the icon of Arduino to enter the desired development environment shown as below.


Installing Driver
Next, we will introduce the driver installation of REV4 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 REV4 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.


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

2) Example Use of ARDUINO IDE
STEP 1: Open Arduino
In the previous, we have introduced the driver installation of REV4 development board. So this time let’s first have basic understanding of the development environment of ARDUINO. After that, you will learn how to upload the program to Arduino board.
First of all, open the unzipped folder of ARDUINO development software and click icon of ARDUINO to open the software, as the figure shown below.

Arduino folder.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.

Arduino 1-8-5 new.png

0313 箭头.png

Arduino 1-8-5 new2.png

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

Arduino 1-8-5 example.png

Arduino 1-8-5 example2.png

0313 箭头.png

Arduino 1-8-5 example2.png

STEP 3: Select Arduino Board
On the Arduino software, you should click Tools→Board , select the correct board. Here in our tutorial we should select Arduino UNO. Shown as below.

Arduino 1-8-5 board.png

STEP 4: Select Serial Port
If you are not sure which port is correct, at first directly open the Control Panel of your computer, then click to open Device Manager, you can check the COM port here. Shown as below.

Driver 7.png

Then you should click Tools→Serial Port. It may be COM3 or higher (COM1 and COM2 are usually reserved as hardware serial port).

Arduino 1-8-5 port.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.

图片1- arduino toolbar.png

IDE 1.pngVerify/Compile
Check the code for errors
IDE 2.png Upload
Upload the current Sketch to the Arduino
IDE 3.png New
Create a new blank Sketch
IDE 4.png Open
Show a list of Sketches
IDE 5.png Save
Save the current Sketch
IDE 6.pngSerial Monitor
Display the serial data being sent from the Arduino


Buy >> 4DOF Acrylic Toys Robot Mechanical Arm Claw Kit for Arduino DIY Robot


Leave a comment

Please note, comments must be approved before they are published