Arduino Robotic Projects
上QQ阅读APP看书,第一时间看更新

Running the IDE for Uno

Now that the device is installed, you can run the IDE. Select the IDE icon that should have been installed on the desktop as shown in the following screenshot:

When you select this icon, the IDE should start and you should see something like the following screenshot:

This is the environment you will use to develop your applications. The IDE will then make it easy to compile the code, upload it to the device, and run it.

Setting the IDE to your board

First, you'll need to set the IDE to create code for the proper processor because different Arduino boards have slightly different hardware configurations. Fortunately, the IDE lets you set that by choosing the correct board. To do this, navigate to Tools | Board | Arduino Uno as shown in the following screenshot:

Selecting the proper COM port

The next step is to select the proper COM port. To do this, navigate to Tools | Serial Port | COM23 (the port you noted earlier), as shown in the following screenshot:

The IDE should now indicate that you are using the Arduino Uno on COM23 in the lower-right corner of the IDE, as seen in the preceding screenshot.

Opening and uploading a file to Arduino

Now you can open and upload a simple example file. It is called the Blink application. It has already been written for you, so you won't need to do any coding.

To get a Blink application, perform the following steps:

  1. Navigate to File | Examples | 01.Basics | Blink as shown in the following screenshot:
  2. You should then see the Blink code in the IDE window:
  3. Select the Upload button as shown in the following screenshot:
  4. Once you have uploaded the file, it will give you an indication in the lower-left corner of the IDE display that the file has been uploaded:
  5. When the program is uploaded, it will automatically start running and the orange LED on the Arduino Uno will blink:

You have now successfully uploaded your first code to your Arduino!