Required Environment
目前 Ameba 目前僅支援 Windows 32位元/64位元作業系統。
並且使用 Arduino IDE 1.6.5 之後的版本。
Introduction to Ameba
Ameba是一張開發板,適合開發各式的感測器或物聯網應用。它上面的介面有Wifi, GPIO, NFC, I2C, UART, SPI, PWM, ADC,這些介面可以接一些電子元件像是LED燈、開關、壓力計、溫濕度感測器、PM2.5粉塵感測器等等。
這些資料可以經由內建的Wifi上傳到雲端,搭配手機的App實現物聯網的實作。
Ameba與Arduino Uno的大小差不多,圖中上方是Ameba,下方則是Arduino Uno,Ameba的針腳與Arduino Uno相容,Ameba右邊多了NFC天線,如果沒用到NFC天線可以將右邊的板子裁掉。
Ameba使用Micro USB供電,一般的手機充電線就可以用在Ameba上。
Setting up Development Environment
Step 1. 安裝Driver
首先將Micro USB接上Ameba,另一端接上電腦:
第一次接上Ameba需要安裝USB驅動程式,Ameba使用標準的ARM MBED CMSIS DAP driver,你可以在這個地方找到安裝檔及相關說明:
在 "Download latest driver" 下載 “mbedWinSerial_16466.exe” 並安裝之後,會在裝置管理員看到mbed serial port:
Step 2. 安裝Arduino IDE開發環境
Arduino IDE在1.6.5版之後,支援第三方的硬體,因此我們可以在Arduino IDE上開發Ameba,並共享Arduino上面的範例程式。在Arduino官方網站上可以找到下載程式:
安裝完之後,打開Arduino IDE,為了讓Arduino IDE找到Ameba的設定檔,先到 “File” -> “Preferences”
然後在 Additional Boards Manager URLs: 填入:
並且將 “編輯器語言” 從 “中文(台灣)” 改成 English,因為Arduino IDE在中文環境下有問題,也許在Arduino IDE 1.6.7會解決,Issue內容可參考底下網址:
填完之後按OK,然後因為改編輯器語言的關係,我們將Arduino IDE關掉之後重開。
接著準備選板子,到 “Tools” -> “Board” -> “Boards Manager”
在 “Boards Manager” 裡,它需要約十幾秒鐘整理所有硬體檔案,如果網路狀況不好可能會等上數分鐘。每當有新的硬體設定,我們需要重開 “Boards Manager”,所以我們等一會兒之後,關掉 “Boards Manager”,然後再打開它,將捲軸往下拉找到 “Realtek Ameba Boards”,點右邊的Install,這時候Arduino IDE就根據Ameba的設定檔開始下載Ameba所需要的檔案:
接著將板子選成Ameba,選取 “tools” -> “Board” -> “Arduino Ameba”:
這樣開發環境就設定完成了。
Try the First Example
Step 1. 編譯並上傳
Arduino IDE提供許多內建的範例,這些範例只要打開經過編譯上傳之後就可以在板子上執行。我們先嘗試 Blink 範例。
打開 "File" -> "Examples" -> "01.Basics" -> "Blink"
選了 Blink 之後,Arduino IDE會打開另一個視窗,裡面已經有寫好的程式碼。
我們直接編譯這份程式碼,點選 “Sketch” -> “Verify/Compile”
接著會看到 Arduino IDE 下方的訊息列出現一些訊息,代表它正在編譯。編譯完成之後,會看到類似底下的訊息。(沒有紅色訊息就代表沒問題)
接著我們就可以上傳編譯好的程式碼到Ameba上面。先確定Ameba跟電腦之間的線有接上,然後點選 “Sketch” -> “Upload”
接著訊息欄又開始印出一些訊息,這個步驟要等比較久一點,大約要等數十秒到一分鐘,完成之後在訊息欄會看到 “upload finish” 的訊息就代表上傳完成。
Step 2. 測試 Blink 範例
Arduino 不只提供許多範例,也提供每個範例的說明文件,包括如何接線,程式碼的說明,技術內容等等……。這些範例不只是可以在Arduino的板子上使用,也可以在Ameba上面使用。
所以我們可以在Arduino 網站上找到 Blink 的相關說明:
簡單來說,Blink 這個讓 LED 燈泡閃爍,它使用的GPIO接腳是13
Ameba的Pin一樣在D13的位置,根據Ameba的接腳位置圖:
於是我們將電阻以及LED燈泡連接如下圖:
(NOTE:LED裡,長腳的是正極,接到D13的地方,短腳的是負極,接到GND的地方)
然後按一下Reset按鈕,就可以看到燈炮在閃爍,這個實驗就完成了。
如果以上過程遇到問題,請參考
看是否能解決。
目前 Ameba 目前僅支援 Windows 32位元/64位元作業系統。
並且使用 Arduino IDE 1.6.5 之後的版本。
Introduction to Ameba
Ameba是一張開發板,適合開發各式的感測器或物聯網應用。它上面的介面有Wifi, GPIO, NFC, I2C, UART, SPI, PWM, ADC,這些介面可以接一些電子元件像是LED燈、開關、壓力計、溫濕度感測器、PM2.5粉塵感測器等等。
這些資料可以經由內建的Wifi上傳到雲端,搭配手機的App實現物聯網的實作。
Ameba與Arduino Uno的大小差不多,圖中上方是Ameba,下方則是Arduino Uno,Ameba的針腳與Arduino Uno相容,Ameba右邊多了NFC天線,如果沒用到NFC天線可以將右邊的板子裁掉。
Ameba使用Micro USB供電,一般的手機充電線就可以用在Ameba上。
Setting up Development Environment
Step 1. 安裝Driver
首先將Micro USB接上Ameba,另一端接上電腦:
第一次接上Ameba需要安裝USB驅動程式,Ameba使用標準的ARM MBED CMSIS DAP driver,你可以在這個地方找到安裝檔及相關說明:
在 "Download latest driver" 下載 “mbedWinSerial_16466.exe” 並安裝之後,會在裝置管理員看到mbed serial port:
Step 2. 安裝Arduino IDE開發環境
Arduino IDE在1.6.5版之後,支援第三方的硬體,因此我們可以在Arduino IDE上開發Ameba,並共享Arduino上面的範例程式。在Arduino官方網站上可以找到下載程式:
安裝完之後,打開Arduino IDE,為了讓Arduino IDE找到Ameba的設定檔,先到 “File” -> “Preferences”
然後在 Additional Boards Manager URLs: 填入:
https://github.com/Ameba8195/Arduino/raw/master/release/package_realtek.com_ameba_index.json
並且將 “編輯器語言” 從 “中文(台灣)” 改成 English,因為Arduino IDE在中文環境下有問題,也許在Arduino IDE 1.6.7會解決,Issue內容可參考底下網址:
填完之後按OK,然後因為改編輯器語言的關係,我們將Arduino IDE關掉之後重開。
接著準備選板子,到 “Tools” -> “Board” -> “Boards Manager”
在 “Boards Manager” 裡,它需要約十幾秒鐘整理所有硬體檔案,如果網路狀況不好可能會等上數分鐘。每當有新的硬體設定,我們需要重開 “Boards Manager”,所以我們等一會兒之後,關掉 “Boards Manager”,然後再打開它,將捲軸往下拉找到 “Realtek Ameba Boards”,點右邊的Install,這時候Arduino IDE就根據Ameba的設定檔開始下載Ameba所需要的檔案:
接著將板子選成Ameba,選取 “tools” -> “Board” -> “Arduino Ameba”:
這樣開發環境就設定完成了。
Try the First Example
Step 1. 編譯並上傳
Arduino IDE提供許多內建的範例,這些範例只要打開經過編譯上傳之後就可以在板子上執行。我們先嘗試 Blink 範例。
打開 "File" -> "Examples" -> "01.Basics" -> "Blink"
選了 Blink 之後,Arduino IDE會打開另一個視窗,裡面已經有寫好的程式碼。
我們直接編譯這份程式碼,點選 “Sketch” -> “Verify/Compile”
接著會看到 Arduino IDE 下方的訊息列出現一些訊息,代表它正在編譯。編譯完成之後,會看到類似底下的訊息。(沒有紅色訊息就代表沒問題)
接著我們就可以上傳編譯好的程式碼到Ameba上面。先確定Ameba跟電腦之間的線有接上,然後點選 “Sketch” -> “Upload”
接著訊息欄又開始印出一些訊息,這個步驟要等比較久一點,大約要等數十秒到一分鐘,完成之後在訊息欄會看到 “upload finish” 的訊息就代表上傳完成。
Step 2. 測試 Blink 範例
Arduino 不只提供許多範例,也提供每個範例的說明文件,包括如何接線,程式碼的說明,技術內容等等……。這些範例不只是可以在Arduino的板子上使用,也可以在Ameba上面使用。
所以我們可以在Arduino 網站上找到 Blink 的相關說明:
簡單來說,Blink 這個讓 LED 燈泡閃爍,它使用的GPIO接腳是13
Ameba的Pin一樣在D13的位置,根據Ameba的接腳位置圖:
於是我們將電阻以及LED燈泡連接如下圖:
(NOTE:LED裡,長腳的是正極,接到D13的地方,短腳的是負極,接到GND的地方)
然後按一下Reset按鈕,就可以看到燈炮在閃爍,這個實驗就完成了。
如果以上過程遇到問題,請參考
看是否能解決。
Required Environment
Currently, Ameba only supports Windows 32 bits / 64 bits operating system.
In this article, we use Arduino IDE to develop on Ameba boards (please use version 1.6.5 or later).
Introduction to Ameba
Ameba is a programmable platform for developing all kind of IoT applications. Ameba is equiped with various peripheral interfaces, including Wifi, GPIO, NFC, I2C, UART, SPI, PWM, ADC. Through these interfaces, Ameba can connect with electronic components such as LED, switches, manometer, hygrometer, PM2.5 dust sensors, ...etc.
The collected data can be uploaded via WiFi, and be utilized by applications on smart devices to realize IoT implementation.
Ameba and Arduino Uno have similar size, as shown in the above figure (Ameba is the upper one), and the pins on Ameba are compatible with Arduino Uno. Besides the pins, Ameba boards are equipped with an NFC antenna (the right part of Ameba board.) If the NFC feature is not required, the NFC antenna can be cut down from Ameba board.
Ameba uses Micro USB to supply power, which is common in many smart devices.
Setting up Development Environment
Step 1. Installing Driver
First, connect Ameba to the computer via Micro USB:
If this is the first time you connect Ameba to your computer, you have to install the USB driver for Ameba. Ameba uses the standard ARM MBED CMSIS DAP driver, you can get the installation file and related information in the following website:
In "Download latest driver" download and install "mbedWinSerial_16466.exe". Afterwards, you will see "mbed Serial Port" in Device Manager of your computer:
Step 2. Set up Arduino IDE
From version 1.6.5, Arduino IDE supports third-party hardware. Therefore, we can use Arduino IDE to develop applications on Ameba, and the examples of Arduino can run on Ameba too. Arduino IDE can be downloaded in the Arduino website:
When the installation is finished, open up Arduino IDE. To set up Ameba correctly in Arduino IDE, go to "File" -> "Preferences"
And paste the following URL into "Additional Boards Manager URLs" field:
Moreover, please make sure the IDE language is set to English to avoid the following issue:
If you have changed the language setting, please restart the Arduino IDE.
Next, go to "Tools" -> "Board" -> "Boards Manager":
The "Boards Manager" requires about 10~20 seconds to refresh all hardware files (if the network is in bad condition, it may take longer). Every time the new hardware is connected, we need to reopen the Board Manager. So, we close the Boards Manager, and then open it again. Find "Realtek Ameba Boards" in the list, click "Install", then the Arduino IDE starts to download required files for Ameba.
Finally, we select Ameba as current connected board in "tools" -> "Board" -> "Arduino Ameba":
Try the First Example
Step 1. Compile & Upload
Arduino IDE provides many built-in examples, which can be compiled, uploaded and run directly on the boards. Here, we take the "Blink" example as the first try.
Open "File" -> "Examples" -> "01.Basics" -> "Blink":
Arduino IDE opens a new window with the complete sample code.
Next, we compile the sample code directly, click "Sketch" -> "Verify/Compile"
Arduino IDE prints the compiling messages in the bottom area of the IDE window. When the compilation is finished, you will get the message similar to the following figure:
Afterwards, we will upload the compiled code to Ameba. Please make sure Ameba is connected to your computer, then click "Sketch" -> "Upload"
Again, during the uploading procedure the IDE prints messages. Uploading procedure requires respectively longer time (about 30 seconds to 1 minute). When upload completed, the "upload finish" message is printed.
Step 2. Run the Blink example
In each example, Arduino not only provides sample code, but also detailed documentation, including wiring diagram, sample code explanation, technical details, ...etc. These examples can be directly used on Ameba.
So, we find the detailed information of the Blink example:
In short, this example make LED blinks, and it uses GPIO pin 13.
According to the pin diagram of Ameba, we find pin D13:
Then we connect the LED and resistance as the following figure:
(NOTE: In an LED, the longer pin is the positive pole, and shorter pin is the negative pole. So we connect the longer pin to D13, and connect the shorter pin to GND.)
Finally, press the reset button, and you can see the LED blinking.
If you encounter any problem, please refer to Trouble-shooting .
Currently, Ameba only supports Windows 32 bits / 64 bits operating system.
In this article, we use Arduino IDE to develop on Ameba boards (please use version 1.6.5 or later).
Introduction to Ameba
Ameba is a programmable platform for developing all kind of IoT applications. Ameba is equiped with various peripheral interfaces, including Wifi, GPIO, NFC, I2C, UART, SPI, PWM, ADC. Through these interfaces, Ameba can connect with electronic components such as LED, switches, manometer, hygrometer, PM2.5 dust sensors, ...etc.
The collected data can be uploaded via WiFi, and be utilized by applications on smart devices to realize IoT implementation.
Ameba and Arduino Uno have similar size, as shown in the above figure (Ameba is the upper one), and the pins on Ameba are compatible with Arduino Uno. Besides the pins, Ameba boards are equipped with an NFC antenna (the right part of Ameba board.) If the NFC feature is not required, the NFC antenna can be cut down from Ameba board.
Ameba uses Micro USB to supply power, which is common in many smart devices.
Setting up Development Environment
Step 1. Installing Driver
First, connect Ameba to the computer via Micro USB:
If this is the first time you connect Ameba to your computer, you have to install the USB driver for Ameba. Ameba uses the standard ARM MBED CMSIS DAP driver, you can get the installation file and related information in the following website:
In "Download latest driver" download and install "mbedWinSerial_16466.exe". Afterwards, you will see "mbed Serial Port" in Device Manager of your computer:
Step 2. Set up Arduino IDE
From version 1.6.5, Arduino IDE supports third-party hardware. Therefore, we can use Arduino IDE to develop applications on Ameba, and the examples of Arduino can run on Ameba too. Arduino IDE can be downloaded in the Arduino website:
When the installation is finished, open up Arduino IDE. To set up Ameba correctly in Arduino IDE, go to "File" -> "Preferences"
And paste the following URL into "Additional Boards Manager URLs" field:
https://github.com/Ameba8195/Arduino/raw/master/release/package_realtek.com_ameba_index.json
Moreover, please make sure the IDE language is set to English to avoid the following issue:
If you have changed the language setting, please restart the Arduino IDE.
Next, go to "Tools" -> "Board" -> "Boards Manager":
The "Boards Manager" requires about 10~20 seconds to refresh all hardware files (if the network is in bad condition, it may take longer). Every time the new hardware is connected, we need to reopen the Board Manager. So, we close the Boards Manager, and then open it again. Find "Realtek Ameba Boards" in the list, click "Install", then the Arduino IDE starts to download required files for Ameba.
Finally, we select Ameba as current connected board in "tools" -> "Board" -> "Arduino Ameba":
Try the First Example
Step 1. Compile & Upload
Arduino IDE provides many built-in examples, which can be compiled, uploaded and run directly on the boards. Here, we take the "Blink" example as the first try.
Open "File" -> "Examples" -> "01.Basics" -> "Blink":
Arduino IDE opens a new window with the complete sample code.
Next, we compile the sample code directly, click "Sketch" -> "Verify/Compile"
Arduino IDE prints the compiling messages in the bottom area of the IDE window. When the compilation is finished, you will get the message similar to the following figure:
Afterwards, we will upload the compiled code to Ameba. Please make sure Ameba is connected to your computer, then click "Sketch" -> "Upload"
Again, during the uploading procedure the IDE prints messages. Uploading procedure requires respectively longer time (about 30 seconds to 1 minute). When upload completed, the "upload finish" message is printed.
Step 2. Run the Blink example
In each example, Arduino not only provides sample code, but also detailed documentation, including wiring diagram, sample code explanation, technical details, ...etc. These examples can be directly used on Ameba.
So, we find the detailed information of the Blink example:
In short, this example make LED blinks, and it uses GPIO pin 13.
According to the pin diagram of Ameba, we find pin D13:
Then we connect the LED and resistance as the following figure:
(NOTE: In an LED, the longer pin is the positive pole, and shorter pin is the negative pole. So we connect the longer pin to D13, and connect the shorter pin to GND.)
Finally, press the reset button, and you can see the LED blinking.
If you encounter any problem, please refer to Trouble-shooting .
編譯blink出現
ReplyDeletearm-none-eabi-gcc: error: C:\Users\sean\AppData\Local\Temp\build603195134530041217.tmp/core.a: No such file or directory
編譯時發生錯誤
請問如何解?