還是我的一個學生寫的英語教程(寫的時候 12 歲),之前比較忙,沒時間翻譯,今天希望可以翻譯多幾課吧!

Arduino: Lesson 1 - Introduction to Arduino and Installation

第一課:Arduino 的介紹及安裝

Preface

前言

Who should learn Arduino?

Anyone that are interested in robot programming using Arduino。

誰應該學習 Arduino?

所有對 Arduino 機械人程式設計有興趣的人。

What do you need to learn Arduino?

- an Arduino Set, either Arduino Uno or Aruino Mega will be appropriate。

- a Windows PC, with at least 4GB memory and 100GB hard disk space, running Windows 7 or above。

學習 Arudio 需要什麼?

一套 Arduino,最好是 Arduino Mega,但是 Arduino Uno 也可以。

一臺 Windows 電腦,最少需要 4GB 記憶體及 100GB 硬碟,作業系統需要 Win7 或以上。

1.1 Arduino IDE Selection

1.1 Arduino IDE 的選擇

To write programs to control an Arduino board, we need an IDE。 The official IDE can be found in the following website:

編寫 Arduino 程式,我們需要一個 IDE (程式設計開發環境),官方的 IDE 可以在以下網址下載:

http://www。arduino。cc

In the arduino official web site, there are 2 ways that you can use the arduino IDE:

在 Arduino 官方網站,有兩個方法可以使用 Arduino IDE:

1。 Use the IDE on the web using a PC web browser, the url for the IDE is:

直接用瀏覽器使用 IDE,網址是:

http://create。arduino。cc

2。 Download the IDE and install

2。 下載並安裝 IDE。

However, in our lessons, we

ARE NOT

going to use the official IDE, we‘ll be using the Visual Studio 2017 Community instead, with the following reasons:

但是,在我們的課程裡,我們將【不會使用】官方 IDE,而會使用 Visual Studio 2017 Community,原因如下:

1。 We may use combined technologies in the future to build a Single Robot, for example, we combine EV3 and Arduino to build a robot, and use different programming languages such as C++ and Python and JavaScript to control the single robot。

For example, this web site, is built from a single Visual Studio Solution with 3 projects, namely:

- the “zephan。top” project: A Cordova project that contains all the resources for this web site, so that you can watch this web site using a PC/mobile browser, or you can “install” this web site as an APP in an Android or iPhone。

- the “ev3pythonlessons” project: A Python project that contains all the source code for the EV3 Python Lessons。

- the “arduinolessons” project folder: Arduino projects that contains all the source code for the Arduino Lessons。

我們可以使用多種科技去建立一個機器人,比方說,我們可以使用多種程式語言:C++,Python, JavaScript 去建立一臺由 EV3 及 Arduino 結合的機器人。

舉個例子,你現在看的這個網站(

http://www。

zephan。top

),就是一個 Visual Studio 解決方案,包含了 3 個專案:

zephan。top 專案:是一個 Cordova 專案,包含了本網站的所有資源,讓使用者可以使用瀏覽器瀏覽這個網站,也可以把網站以App 的模式,在安卓或蘋果手機裡安裝使用。

ev3pythonlessons 專案:一個 Python 專案,包含了所有 EV3 Python 課程的原始碼。

arduinolessons專案:包含了所有 Arduino 課程原始碼。

2。 Your programming team has more than 1 programmers, so that your team can develop the same programs with source control。

2。 你的開發團隊超過一個人的話,就可以利用原始碼控制功能實現團隊開發。

1.2 Installation of Visual Studio 2017 Community

1.2 安裝 Visual Studio 2017 Community

Before using Visual Studio as the IDE, you should first install the official Arduino IDE as stated in 1。1。 To download Microsoft Visual Studio 2017 Community, go to the following web-site:

在安裝 Visual Studio 之前,你必須按本課程 1。1 先安裝 Arduino 官方 IDE,Visual Studio 的安裝地址在以下網址:

http://www。visualstudio。com

Make sure you select at least the:

安裝的時候你最少要選擇以下模組:

- C++ Desktop Developemnt

during the installation。

It may take more than an hour to finish the installation。

安裝可以需要 1 小時。

1.3 Installation of Visual Studio Arduino Support

1.3 安裝 Visual Studio Arduino 支援

After you launch vs2017:

1。 Go to “Tools” -> “Extension and Update”

2。 Select “Online” on the left hand side

3。 Type “arduino” in the search field:

開啟 Visual Studio 2017 後:

選擇 【Tools】-> 【Extension and Update】

2。 左邊選擇 【Online】

3。 搜尋 Arduino

Arduino高階程式設計 1:安裝

Figure 1。1

4。 Download “Arduino IDE for Visual Studio”

4。 下載 “Arduino IDE for Visual Studio”

5。 After the download, quit Visual Studio, and the installation will begin automatically。

5。 下載後,離開 Visual Studio,安裝將會馬上開始。

6。 After the install, open Visual Studio again。

6。 安裝後,重新開啟 Visual Studio。

1.4 Installation of a "Circuit Viewer"

1.4 安裝【電路圖編輯及檢視器】

In order to view the hardware circuit of the Arduino and other accessories, we’ll need a circuit viewer software, you can download it from the following web site:

檢視 Arduino 及其他零件的電路圖,我們需要安裝一個電路圖編輯及檢視軟體,可以在以下網址下載:

http://www。

fritzing。org

You‘ll need to unzip the zip file。

你需要解壓下載的文件。

To run the program, run “fritzing。exe”, there is NO NEED to install before running。

解壓後可以直接執行 fritzing。exe,無需安裝。

In our next lesson, we’ll write our first program to control a “Blinking LED”。

在下一課,我們將編寫我們的第一個程式【LED閃燈】。