Arduino IDE

! Please do NOT skip this chapter even if you have already installed the Arduino IDE.

The control board of the robot is compatible with Arduino IDE. The Arduino IDE is free and open source. We will use it to write and upload code to the control board.

Arduino IDE

Arduino Software (IDE) is used to write and upload the code for Arduino Board.

First, install Arduino Software (IDE): visit https://www.arduino.cc/en/software/

../../../_images/Preface03.png

Select and download corresponding installer based on your operating system. If you are a Windows user, please select the “Windows” to download and install the driver correctly.

../../../_images/Preface04.png

After the downloading completes, run the installer. For Windows users, there may pop up an installation dialog box of driver during the installation process. When it is popped up, please allow the installation.

After installation is completed, an shortcut will be generated in the desktop.

../../../_images/Preface05.png

Run it. The interface of the software is as follows:

../../../_images/Preface06.png

Programs written with Arduino IDE are called sketches. These sketches are written in a text editor and are saved with the file extension.ino. The editor has features for cutting/pasting and for searching/replacing text. The console displays text output by the Arduino IDE, including complete error messages and other information. The bottom right-hand corner of the window displays the configured board and serial port. The toolbar buttons allow you to verify and upload programs, open the serial monitor, and access the serial plotter.

Preface07

Verify

Checks your code for errors compiling it.

Preface08

Upload

Compiles your code and uploads it to the configured board.

Preface09

Debug

Troubleshoot code errors and monitor program running status.

Preface10

Serial Plotter

Real-time plotting of serial port data charts.

Preface11

Serial Monitor

Used for debugging and communication between devices and computers.

Install Boards

Check if “Arduino AVR Boards“ have been installed. It may be automatically installed when the Arduino IDE is first opened. If it is not installed, click ”Install“ to install it.

../../../_images/Arduino03.png

Control Board

The control board of the robot (Freenove Crawling Robot Controller) is used to drive this robot.

It can connect 18 servos, a WLAN module and a wireless module. There are also some IO and power ports for your use.

../../../_images/Arduino04.png

First Use

Open the example sketch “Blink”.

../../../_images/Arduino05.png

Click “Select Board” > “Select other board and port…”.

Note

There may be one or more devices displayed here, ignore them.

../../../_images/Arduino06.png

Connect the control board to your computer with a USB cable.

../../../_images/Arduino07.png

A new device (port) will appear in the PORTS list on the right, click to select it.

Note

Your port name may be different from the following figure, especially on other computer systems.

../../../_images/Arduino08.png

Can’t find the port? You may need to install the driver. Please see folder “Drivers”.

This “Drivers” folder is in the folder that contains this PDF tutorial.

Find “Arduino Mega or Mega 2560” in the BOARDS list on the left and click to select it. Then click “OK”.

../../../_images/Arduino09.png

Click the “Verify” button.

../../../_images/Arduino10.png

Figure below shows the code is being compiled.

../../../_images/Arduino11.png

Wait a moment for the compiling to be completed. Figure below shows the code size and percentage of space occupation. If there is any error in the code, the compilation will fail and the details will be shown here.

../../../_images/Arduino12.png

Click the “Upload” button.

../../../_images/Arduino13.png

Figure below shows the code is being uploaded.

../../../_images/Arduino14.png

Wait a moment for the uploading to be completed.

Usually, you can directly click the “Upload” button, the compilation will automatically proceed first.

../../../_images/Arduino15.png

Having problems? Contact us for help! Send mail to: support@freenove.com

We will see the LED marked with “L” on the control board starts blinking. It indicates that the code is running!

../../../_images/Arduino16.png

So far, we have completed the first use. I believe you have felt the joy of it.