Search Results

FatfsSDIO – Read and open HTML file from SD card

…將 MicroSD 卡插入電腦,將 HTML 文件複製到 SD 卡中(注意:不要將文件放在 SD 卡的任何資料夾內)。 這是用於測試的 HTML 範例,“Web_test.html”。 然後將 MicroSD 卡插入 RTL8722DM MINI 板的 SD 讀卡器。 打開範例,“Files”->“Examples”->“AmebaFatfsSDIO”->“read_html_from_SD_card” 上傳代碼並在上傳完成後按 Ameba 上的重置按鈕。 建立連接後,您應該能夠在串口監視器中看到消息“To see this page in action,…

Read More »

FaceDetection Class

…Get face detection results. Syntax FaceDetectionResult getResult(uint16_t index); std::vector getResult(void); Parameters index: index of specific face detection result to retrieve. Returns If no index is specified, the function returns all…

Read More »

File System – Read and display HTML file from SD card

…card 範例說明 流程說明 使用讀卡器,將 SD 卡連接到電腦並將 HTML 文件複製到 SD 卡中。 請注意將文件放在根目錄中,而不是任何文件夾中。 HTML 示例文件可以在以下位置下載 (https://github.com/ambiot/ambpro2_arduino/tree/dev/Ameba_misc/Example_Samples/Web_test.html)。 然後將MicroSD卡插入AMB82 MINI開發板的SD卡槽。 開啟範例, “File” -> “Example” -> “AmebaFileSystem” -> “ReadHTMLFile” 範例代碼中,修改“ssid”為要連接的WiFi SSID,“pass”為網絡密碼。 上傳代碼並在上傳完成後按下電路板上的重置按鈕。 等待開發板連接到 WiFi。 建立連接後,串口監視器將打印消息…

Read More »

ObjectDetection Class

…function. NNObjectDetection::getResult Description Get object detection results. Syntax ObjectDetectionResult getResult(uint16_t index); std::vector getResult(void); Parameters index: index of specific object detection result to retrieve Returns If no index is specified, the…

Read More »

WiFiClass Class

…function. WiFiClass::BSSID Description Get the current BSSID (Basic Service Set Identifier) associated with the network. Syntax uint8_t* BSSID(uint8_t* bssid); Parameters bssid: an array to store bssid (8-bit unsigned integer). Returns…

Read More »

WiFiClass Class

…class function. WiFiClass::SSID Description Get the current SSID (Service Set Identifier) associated with the network. Syntax char* SSID(void); Parameters NA Returns This function returns current SSID associate with the network….

Read More »

VideoStreamOverlay Class

…started using begin(). VideoStreamOverlay::createBitmap Description Create bitmap on video streams. Syntax void createBitmap (int ch, int idx = 0); Parameters ch: Channel to configure (Valid value: 0,1,2) idx: Layer index

Read More »

Amazon Alexa

…我們會跳回前一個Lambda設定的頁面 AWS Lambda – Configure function (cont.) 設定新的Role並且從AWS IAM返回之後, 可以看到 “Role”以及 “Existing Role”的欄位已經有值 接著接到頁面下方在kill ID verification欄位選擇“Enable”,另外還有Skill ID的部份,我們在下一章節介紹如何拿到Skill ID AWS Lambda – Get the Skill ID 接著我們要回到Alexa Skill的首頁,我們可以看到在Skill Name欄位的下方,已出現一組字碼,這即是我們需要的SKILL ID,點擊他將會自動copy,並且回到上一步的SKILL ID欄位填入SKILL…

Read More »

Audio Classification Class

index); std::vector getResult(void); Parameters index: index of specific audio classification result to retrieve Returns If no index is specified, the function returns all recognized audio classes contained in a vector…

Read More »

FaceDetectionRecognition Class

…the class function. NNFaceDetectionRecognition::getResult Description Get face recognition results. Syntax FaceRecognitionResult getResult(uint16_t index); std::vector getResult(void); Parameters index: index of specific face recognition result to retrieve. Returns If no index is…

Read More »

MotionDetection Class

…and Warnings “MotionDetection.h” must be included to use the class function. MotionDetection::getResult Description Get motion detection results. Syntax MotionDetectionResult getResult(uint16_t index); std::vector getResult(void); Parameters index: index of specific motion detection…

Read More »

Use Amazon AWS IoT Shadow Service

…常用的topic有這些 “$aws/things/ameba/shadow/update/accepted”, “$aws/things/ameba/shadow/update/rejected”, “$aws/things/ameba/shadow/update/delta”, “$aws/things/ameba/shadow/get/accepted”, “$aws/things/ameba/shadow/get/rejected” 簡易的說明可以參考這裡: http://docs.aws.amazon.com/iot/latest/developerguide/thing-shadow-data-flow.html 註冊完之後,我們publish目前的狀態 sprintf(publishPayload, “{\”state\”:{\”reported\”:{\”led\”:%d}},\”clientToken\”:\”%s\”}”, led_state, clientId); client.publish(publishTopic, publishPayload); 傾聽topic並做出回應 我們在callback裡傾聽先前註冊的5個topic,並且檢查是否有 “/shadow/get/accepted” if (strstr(topic, “/shadow/get/accepted”) != NULL) { 如果有的話,代表控制端送了訊息過來,我們解析裡面的內容,如果led狀態與現在不同,則publish新的狀態 updateLedState(desired_led_state); 解決方案 IoT SoC /…

Read More »

BLEUUID Class

index [0]. BLEUUID::dataNative Get the binary representation of UUID, with the UUID LSB in array index [0]. BLEUUID::length Get the length of UUID. BLEUUID::BLEUUID Description Create a BLEUUID object from…

Read More »

BLEUUID Class

index [0]. BLEUUID::dataNative Get the binary representation of UUID, with the UUID LSB in array index [0]. BLEUUID::length Get the length of UUID. BLEUUID::BLEUUID Description Create a BLEUUID object from…

Read More »

Solar panel – Upload Temperature and Humidity Data To LASS System

…“lass_for_dht_plus_ps_nfc” 這邊要注意,當直接供電至Ameba Module時,開發板上的3.3V會因為預設並不是從Module供電,所以無法使用。此時其它需要3.3V供電的模組就需要直接從降壓模組供電。 另一個值得注意的是,圖中NFC的天線板是裁開的,中間與Amabe只用線材連結,只要線不要太長基本上感應的效率不會變太差。將連結的兩條線互相纏繞可以稍減線材變長的問題。如果不喜歡這個天線板,也可以接其它的天線,NFC的天線使用電磁感應的方式,官方網站曾試過直接用杜邦線繞幾圈,也試過悠遊卡的代幣,或其它NFC tag的天線,基本上感應的效果都不太一樣。另外,如果不想使用AMS1117,也可以直接供電至5V的地方 但是要注意,供應至5V的地方也會啟動DAP,造成額外的耗電。 要執行範例,需要修改幾個參數: Wifi連線需要使用的ssid/password LASS的clientId,預設是FT_LIVE_12345678,請改成不同的值。 編譯並上傳至Ameba之後,按下Reset按鈕,等待一會兒應該可以在 “零時空觀汙網” 看到資料: http://g0vairmap.3203.info/map.html 範例程式預設將位置填入瑞昱的位置,可以在新竹的地方找到這個點,或是由左下方條件篩選只留LASS。目前資料上雲端之後,有些小數點轉換的誤差,所以填入的位置可能會偏離,這個需要注意一下。 NFC的功能,官網有提供一個NFC的應用程式,如果你的Android手機已經打開NFC功能,去感應NFC天線,就會打開google play對應的應用程式網頁。 或是可以到這個地方下載: https://play.google.com/store/apps/details?id=com.realtek.sensortag 安裝完成後,用手機感應Tag,會出現最近一次量測的溫濕度。點下方的按鈕可以從網路端得到當天的溫濕度資料。 耗電分析 以下是一些細節的說明 太陽能板的供電效率 這裡我們測量亮度的單位為照度(LUX),照度是以人眼感受測量出來的亮度,不同波長的光線照度也不一樣。同時我們使用鹵素燈泡模擬太陽光,一般來說鹵素燈是常見用來模擬太陽光的光源。 在臺灣晴天無雲的情況下 ,早上10點至下午兩點大約可以量到照度100K LUX左右,傍晚四點左右則可以量到照度10k LUX。 改成使用100W的鹵素燈,距離20cm的地方照度為10k LUX,距離5cm的地方照度為100k LUX。但是距離燈泡太近會讓太陽能板太熱而造成效率降低,所以實驗中保持一定距離比較好。這裡我們使用20cm的距離做實驗。…

Read More »

E-paper – Display User-generated QR code

…我們使用 Good Display GDEH029A1 2.9 Inch / 296×128 Resolution / Partial Refresh Arduino Sample Code: http://www.good-display.com/product/201.html [2] 可參考 EPD 庫: https://github.com/waveshare/e-Paper [3] 提供如何在 e-Paper 模塊上生成二維碼的鏈接: https://eugeniopace.org/qrcode/arduino/eink/2019/07/01/qrcode-on-arduino.html [4] A simple library…

Read More »

GPIO – Using DS18B20 thermometer

…Ameba MakerPro AmebaIoT Worldwide 登入 Choose a language 简体中文 繁體中文 English Search Search GPIO – 使用DS18B20溫度感測器 材料準備 Ameba x 1 DS18B20 x 1 範例說明 DS18B20 是一款溫度感測器,可量測範圍-55℃~+125℃,範圍在-10℃~+85℃時精準度為±0.5℃,它使用單線的資料線,並且在微秒(microseconds)等級的時間間隔裡處理資料的輸入與輸出。 Ameba使用OneWire library ( http://www.pjrc.com/teensy/td_libs_OneWire.html

Read More »

Amazon Service

…avs_client_id: 這裡的 client id就是之前設定 AVS時取得的client id avs_client_secret: 這裡的 client secret 就是之前設定 AVS 時取得的 client secret avs_http2_host: 提供辨識語音的host,目前Amazon提供好幾組host供不同語系的使用者使用。這裡我們填美國在使用的host 填完之後就可以編譯上傳至Ameba 測試 在Realtek Audio Shield上的按鈕用於喚醒Ameba,我們將它按著,講話,然後放開,Ameba就會將語音資料上傳到雲端,雲端會回傳語音回應至Ameba,Ameba再將它播放。 請參考底下影片的示範: 程式碼說明 程式碼 setup_alexa() 在 setup_alexa() 這個函式裡,設定了所有Alexa需要的資訊 Alexa.setAvsClientId(avs_client_id,sizeof(avs_client_id)-1);…

Read More »

E-Paper – Display Images

…Partial Refresh Arduino Sample Code: http://www.good-display.com/product/201.html [2] 可參考 EPD 庫: https://github.com/waveshare/e-Paper [3] 在 e-Paper 模塊上生成二維碼: https://eugeniopace.org/qrcode/arduino/eink/2019/07/01/qrcode-on-arduino.html 解決方案 IoT SoC / MCU Video SoC 開發者專區 購買開發版 Standard SDK Ameba ARDUINO AWS…

Read More »

MQTT – Use Amazon AWS IoT Shadow Service

…(!client.connected()) { 訂閱並發布 接下來,訂閱主題。 for (int i=0; i<5; i++) { client.subscribe(subscribeTopic[i]); } 有一些共同的主題: “$aws/things/ameba/shadow/update/accepted”, “$aws/things/ameba/shadow/update/rejected”, “$aws/things/ameba/shadow/update/delta”, “$aws/things/ameba/shadow/get/accepted”, “$aws/things/ameba/shadow/get/rejected” 相關文件: http://docs.aws.amazon.com/iot/latest/developerguide/thing-shadow-data-flow.html 然後發布當前狀態: sprintf(publishPayload, “{\”state\”:{\”reported\”:{\”led\”:%d}},\”clientToken\”:\”%s\”}”, led_state, clientId); client.publish(publishTopic, publishPayload); 檢查主題並做出回應: 在回調函數中,我們檢查5個訂閱的主題,並檢查是否有“/shadow/get/accepted”消息: if…

Read More »

E-Paper – Display User-Generated QR Code

…→ “AmebaEink” → “DisplayQR”: 根據需要修改 loop() 部分中的 URL,然後驗證代碼並將其上傳到 Ameba 板。 上傳範例代碼後,按重置按鈕,根據您輸入的 URL 生成的二維碼將顯示在e-Paper模塊上。 下面顯示的二維碼可以連結至我們的Ameba IoT 網站. 程式碼說明 [1] 我們使用Good Display GDEH029A1 2.9英寸/ 296×128解析度/部分刷新Arduino範例代碼來成功獲取e-Paper顯示: http://www.good-display.com/product/201.html [2] 提供如何在e-Paper模塊上生成二維碼的鏈接: https://eugeniopace.org/qrcode/arduino/eink/2019/07/01/qrcode-on-arduino.html [3] 用於在 C…

Read More »

E-Paper – Display Images

…程式碼說明 [1] 我們使用Good Display GDEH029A1 2.9英寸/ 296×128解析度/部分刷新Arduino範例代碼來成功獲取e-Paper顯示: http://www.good-display.com/product/201.html [2] 提供有關如何在e-Paper模塊上生成QR碼的連結: https://eugeniopace.org/qrcode/arduino/eink/2019/07/01/qrcode-on-arduino.html 解決方案 IoT SoC / MCU Video SoC 開發者專區 購買開發版 Standard SDK Ameba ARDUINO AWS IoT ExpressLink Amazon FreeRTOS Arm…

Read More »

Ameba ARDUINO: Getting Started with AMB82 MINI (RTL8735B)

…版本開始,Arduino IDE 支持第三方硬件。因此,我們可以使用Arduino IDE開發應用程序,並且Arduino有基礎範例可供參考。 Arduino IDE 可以在 Arduino 網站下載: https://www.arduino.cc/en/Main/Software 安裝完成後,打開Arduino IDE。請打開 “File” -> “Preferences” 來正確設置。 並將以下 URL 粘貼到“Additional Boards Manager URLs”字串中:https://github.com/ambiot/ambpro2_arduino/raw/main/Arduino_package/package_realtek_amebapro2_index.json 接下來,打開 “Tools” -> “Board” -> “Boards Manager”: “Boards…

Read More »

Ameba ARDUINO: Getting Started with BW16/RTL8720DN

…https://forum.amebaiot.com/t/macos-environment/2260。 步驟二、 設定 Arduino IDE 從 1.6.5 版本開始,Arduino IDE 支持第三方硬件。 Arduino IDE用於在BW16上開發應用程序,以及Arduino基本範例(refer to the basic example link)。 Arduino IDE 可以在 Arduino 網站下載: https://www.arduino.cc/en/Main/Software 安裝完成後,打開Arduino IDE。請打開 “File” -> “Preferences”. 並將以下 URL…

Read More »

DHT Class

…may also be up to 2 seconds. DHT::computeHeatIndex Description Compute the HeatIndex from the readings (Using both Rothfusz and Steadman’s equations). More details refer to http://www.wpc.ncep.noaa.gov/html/heatindex_equation.shtml . Syntax float computeHeatIndex(bool…

Read More »

Ameba ARDUINO: Getting Started with BW16 type C

…64 位元、Linux OS (Ubuntu) 和 macOS。 為了獲得最佳體驗,請使用最新版本的作業系統。 任何 Linux 作業系統 (Ubuntu) 相關問題,請參考 https://forum.amebaiot.com/t/ubuntu-linux-environment/2259。 任何 macOS 作業系統相關問題,請參考 https://forum.amebaiot.com/t/macos-environment/2260。 步驟二、 設定 Arduino IDE 從 1.6.5 版本開始,Arduino IDE 支持第三方硬件。 Arduino IDE用於在開發板上開發應用程序,以及Arduino基本範例(請參考 basic example…

Read More »

IR – Transmit IR Sony Data

…Library for the Arduino http://www.righto.com/2009/08/multi-protocol-infrared-remote-library.html [3] SB-Projects: IR Remote Control Project https://www.sbprojects.net/knowledge/ir/index.php [4] SONY SIRC Protocol https://www.sbprojects.net/knowledge/ir/sirc.php 解決方案 IoT SoC / MCU Video SoC 開發者專區 購買開發版 Standard SDK Ameba ARDUINO…

Read More »

IR – Transmit IR NEC Raw Data and Decode

…Infrared Remote Library for the Arduino http://www.righto.com/2009/08/multi-protocol-infrared-remote-library.html [4] SB-Projects: IR Remote Control Project https://www.sbprojects.net/knowledge/ir/index.php 解決方案 IoT SoC / MCU Video SoC 開發者專區 購買開發版 Standard SDK Ameba ARDUINO AWS IoT ExpressLink…

Read More »

DHT Class

…Rothfusz and Steadman’s equations). More details refer to http://www.wpc.ncep.noaa.gov/html/heatindex_equation.shtml . Syntax float computeHeatIndex(bool isFahrenheit = true); float computeHeatIndex(float temperature, float percentHumidity, bool isFahrenheit = true); Parameters temperature: The temperature value…

Read More »

DHT Class

…may also be up to 2 seconds. DHT::computeHeatIndex Description Compute the HeatIndex from the readings (Using both Rothfusz and Steadman’s equations). More details refer to http://www.wpc.ncep.noaa.gov/html/heatindex_equation.shtml . Syntax float computeHeatIndex(bool…

Read More »

Ameba ARDUINO: Getting Started with RTL8710

…首先將Mirco USB 接上 RTL8710,另一端接上電腦 第一次接上Ameba需要安裝USB驅動程式,Ameba使用標準的Arm MBED CMSIS DAP driver,你可以在這個地方找到安裝檔及相關說明: https://developer.mbed.org/handbook/Windows-serial-configuration 在 “Download latest driver” 下載 “mbedWinSerial_16466.exe” 並安裝之後,會在裝置管理員看到mbed serial port: Step 2. 安裝Arduino IDE開發環境 Arduino IDE在1.6.5版之後,支援第三方的硬體,因此我們可以在Arduino IDE上開發Ameba,並共享Arduino上面的範例程式。在Arduino官方網站上可以找到下載程式: https://www.arduino.cc/en/Main/Software 安裝完之後,打開Arduino IDE,為了讓Arduino IDE找到Ameba的設定檔,先到…

Read More »

BLEService Class

…Code Example: BLEUartService (https://github.com/ambiot/ambd_arduino/blob/dev/Arduino_package/hardware/libraries/BLE/examples/BLEUartService/BLEUartService.ino) Notes and Warnings “BLEService.h” must be included to use the class function. BLEService::setUUID Description Set the service UUID. Syntax void setUUID(BLEUUID uuid); Parameters uuid: service UUID,

Read More »

BLEService Class

…Code Example: BLEUartService (https://github.com/ambiot/ambd_arduino/blob/dev/Arduino_package/hardware/libraries/BLE/examples/BLEUartService/BLEUartService.ino) Notes and Warnings “BLEService.h” must be included to use the class function. BLEService::setUUID Description Set the service UUID. Syntax void setUUID(BLEUUID uuid); Parameters uuid: service UUID,

Read More »

Ameba ARDUINO: Getting Started with RTL8195

…MBED CMSIS DAP driver,你可以在這個地方找到安裝檔及相關說明: https://developer.mbed.org/handbook/Windows-serial-configuration 在 “Download latest driver” 下載 “mbedWinSerial_16466.exe” 並安裝之後,會在裝置管理員看到mbed serial port: Step 2. 安裝Arduino IDE開發環境 Arduino IDE在1.6.5版之後,支援第三方的硬體,因此我們可以在Arduino IDE上開發Ameba,並共享Arduino上面的範例程式。在Arduino官方網站上可以找到下載程式: https://www.arduino.cc/en/Main/Software 安裝完之後,打開Arduino IDE,為了讓Arduino IDE找到Ameba的設定檔,先到 “File” -> “Preferences” 然後在 Additional…

Read More »

Ameba ARDUINO: Release History

…hang issues on linux – Update SDK structure avoid the too long file name issue – Fix wlan ssl hang/hardfault issue – Remove google iot example Version 2.0.11 – 2021/09/28…

Read More »

Ameba MicroPython: Getting Started with BW16

…release “RST” 3. Release “Burn” 上傳模式需要依靠開發板上的擦除快閃或上傳固件。 BW16 MicroPython 端口介紹 基本介紹 根據定義,MicroPython是專門為微控制器設計的精簡高效的Python3編譯器。 MicroPython 透過內建功能-REPL與Microcontroller進行即時交互的方法,將其與其他基於編譯的平台(Arduino等)區分開來。 REPL代表Read-Evaluation-Print-Loop,它是一個交互式提示,可用於存取和控制微控制器。 REPL具有其他強大的特色,例如tab處理,行編輯,自動縮排,輸入歷史記錄等。 它的基本功能類似於標準的Python IDE,但是運行在微控制器上。 要使用REPL,只需在PC上打開任何串行終端軟件(最常用的工具是teraterm,putty等),然後連接到微控制器的串行端口,然後將baudrate設置為115200,然後手動重置開發板,即可看到>>> MicroPython提示符出現在終端畫面上。 您就可以在REPL上輸入任何Python腳本。 建議多嘗試使用 “help()” 函數以獲得更多資訊。 例如,微控制器上電並顯示REPL後,只需鍵入help(),您將看到一個幫助頁面,為您提供有關的更多詳細信息。 如果您輸入help(modules),它將列出所有可用的內建模塊供您使用。 此外,如果您想了解有關模塊的更多資訊,例如可用的API和CONSTANT,只需鍵入以下代碼help(您感興趣的模塊)來獲取該模塊的詳細信息。 讓我們以Pin模塊(GPIO)為例: >>> help(Pin) object…

Read More »

Ameba ARDUINO: Peripherals & Examples

…- HID 遊戲控制器 USB – HID 鍵盤 USB – HID 滑鼠 WS2812B – 基本範例 WS2812B – Patterns 範例 OTA – 通過 OTA 將固件更新到 Ameba Debugging – 使用 Debug 介面 Components…

Read More »

Ameba MicroPython: Getting Started with BW16 Type C

IDE,但是運行在微控制器上。 要使用REPL,只需在PC上打開任何串行終端軟件(最常用的工具是teraterm,putty等),然後連接到微控制器的串行端口,然後將baudrate設置為115200,然後手動重置開發板,即可看到>>> MicroPython提示符出現在終端畫面上。 您就可以在REPL上輸入任何Python腳本。 建議多嘗試使用 “help()” 函數以獲得更多資訊。 例如,微控制器上電並顯示REPL後,只需鍵入help(),您將看到一個幫助頁面,為您提供有關的更多詳細信息。 如果您輸入help(modules),它將列出所有可用的內建模塊供您使用。 此外,如果您想了解有關模塊的更多資訊,例如可用的API和CONSTANT,只需鍵入以下代碼help(您感興趣的模塊)來獲取該模塊的詳細信息。 讓我們以Pin模塊(GPIO)為例: >>> help(Pin) object <class ‘Pin’> is of type type id — init — value — off — on –…

Read More »

E-Paper – Display Text

…MINI 的pinmap。 將代碼上傳到開發板,上傳完成後按reset按鈕。 您會發現這些文字顯示在 e-Paper 上:。 2.9英寸 e-Paper 模組(B)支持紅、黑、白三種顏色。因此可以在最左邊的 e-Paper 顯示器上顯示紅色。 程式碼說明 [1] 我們使用 Good Display GDEH029A1 2.9 Inch / 296×128 Resolution / Partial Refresh Arduino Sample Code: http://www.good-display.com/product/201.html [2]…

Read More »

WiFi – Concurrent Mode

…+ Station 模式,是一種允許設備同時作為無線存取點和 Station 來運行的功能。 在此範例中,Ameba 開發板可以連接到現有的無線網絡,同時為其他設備提供無線連接。 首先,在“File”→“Examples”→“WiFi”→“ConcurrentMode”中打開範例。 在範例代碼中,填寫您的 SSID、密碼、AP SSID、AP 密碼 和 CHANNEL。 如果您希望在程序運行時在Serial monitor中輸入所有資訊,請取消註解 #define MANUAL_INPUT 注意:如果您啟用了MANUAL_INPUT,則在上傳範例代碼並按Ameba上的重置按鈕後,請輸入您的SSID、密碼、AP SSID、AP密碼和CHANNEL。 AP 模式應首先啟動。 對於 Ameba 開發板,有一個限制,即 AP 模式必須與 WiFi station模式設置相同的CHANNEL。 要查看CHANNEL,您可以下載NetSpot工具:…

Read More »

Ameba MicroPython: Getting Started with RTL8722

…Uno尺寸相似,如上圖所示,AMB21/AMB22上的引腳與Arduino Uno兼容。 AMB21/AMB22使用Micro USB來供電,這在許多智能設備中很常見。 引腳圖及功能請參考下圖及表格。 注意:並非上圖/表格中顯示的所有外圍設備組都可在 MicroPython 上使用。 (https://www.amebaiot.com/wp-content/uploads/2020/05/get-start-3.html) GPIO pin GPIO INT ADC PWM UART SPI I2C PB2 ✓ A5 SERIAL2_RX (b)* 1 PB1 ✓ ADC4 SERIAL2_TX (b)* 2…

Read More »

E-Paper – Display Text

…→ “AmebaEink” → “EinkDisplayText”: 將代碼上傳到開發板,上傳完成後按重置按鈕。 就可以看到這些文字: 程式碼說明 [1] 我們使用Good Display GDEH029A1 2.9英寸/ 296×128解析度/部分刷新Arduino範例代碼來成功獲取e-Paper顯示: http://www.good-display.com/product/201.html 解決方案 IoT SoC / MCU Video SoC 開發者專區 購買開發版 Standard SDK Ameba ARDUINO AWS IoT ExpressLink…

Read More »

IRDevice Class

…(us). For more details, please refer to: http://www.righto.com/2009/08/multi-protocol-infrared-remote-library.html. IRDevice::beginNEC Description Allocate resources and start the IR device with a frequency suitable for the NEC protocol. Syntax void beginNEC(uint8_t receivePin, uint8_t…

Read More »

Standard SDK: [RTL8195AM] I2S – Ameba I2S Audio Demo

…Connector (optional) 可調電位器 (optional) 杜邦線數條 (optional) Patch for audio demo: 3.4b_patch_i2s_audio_demo(v01) Patch for sd card: 3.4b_patch_sd_storage_(v04) Demo平台搭建 Teensy音頻擴展板,使用飛思卡爾SGTL5000 codec,支持立體聲耳機輸出與線路輸出,同時也支持立體聲線路輸入以及單通道麥克風輸入。 Teensy音頻擴展板官網資料:https://www.pjrc.com/store/teensy3_audio.html 1. Ameba连接SGTL5000 SGTL5000擴展板通過7根信號線與Ameba相連。 I2C(SDA和SCL)用來控制和調整SGTL參數。 I2S用於傳輸音頻數據,TX,RX,LRCLK(44.1KHz),BCLK(1.41MHz)和MCLK(11.29MHz), 三個時鐘信號均由Ameba產生。 2. Ameba擴展SD卡槽 (optional) 參照下圖連接SD/MMC卡槽到Ameba,可實現Ameba播放存儲在SD卡上的音頻文件(wav格式)。…

Read More »

Standard SDK: [RTL8195AM] Airkiss – Use Airkiss to Configure Wi-Fi Connection

…用戶不具備通過設備熱點的方式進行配置的能力,如老人、家庭主婦等缺乏相關IT知識的用戶人群。 準備 Ameba x 1 Android 手機x 1 Patch file for Airkiss: 3.4b3_patch_aikiss2.0(v02) 手機APP準備 微信提供了Airkiss 調試工具來輔助​​測試Airkiss功能。目前支持Android系統。 可到http://iot.weixin.qq.com/wiki/document-0_6.html點擊下載,將Airkiss調試工具安裝到手機上。 範例說明 將Airkiss patch加入 Ameba project 1. 將Airkiss patch中的文件添加到SDK對應的位置 • airkiss 文件夾複製到SDK下“\component\common\application”中 • wifi_conf.c文件替換SDK中的“component\common\api\wifi\wifi_conf.c”…

Read More »

Using modbus TCP communication protocol

…http://www.modbusdriver.com/modpoll.html 下載之後解壓縮,會看到裡面有不同OS的版本,舉例來說,Windows的版本會在 win32\modpoll.exe 下載Ameba Modbus library 請到這個地方下載Ameba Modbus library: https://github.com/ambiot/amb1_arduino/raw/master/Arduino_libraries/ModbusTCP-1.0.0.zip 安裝library的方式請參考Arduino官方網站的教學文章將zip檔的library加入Ameba: https://www.arduino.cc/en/Guide/Libraries#toc4 這個library預設內存32個16-bit大小的空間。在Modbus的架構裡,Master會認為這個空間是Ameba的register。實作上我們只要將這個空間擺置我們想要的資料即可。 測試範例 請打開範例 “File” -> “Examples” -> “AmebaModbus” -> “simepletest” 這個範例需要連上Wifi AP,請修改要連上的wifi ssid/password,上傳至Ameba之後按下Reset按鈕。 接著我們要使用modpoll這個工具,如果你的OS是windows,請執行底下的命令: modpoll -m tcp -t…

Read More »

Ameba ARDUINO: Getting Started with AMB26

IDE 支持第三方硬件。 Arduino IDE用於在開發板上開發應用程序,以及Arduino基本範例(請參考 basic example link)。 Arduino IDE 可以在 Arduino 網站下載: https://www.arduino.cc/en/Main/Software 安裝完成後,打開Arduino IDE。請打開 “File” -> “Preferences”. 並將以下 URL 複製到 “Additional Boards Manager URLs” 欄位: https://github.com/ambiot/ambd_arduino/raw/master/Arduino_package/package_realtek_amebad_index.json 接下來,打開 “Tools” ->…

Read More »

AMEBA ARDUINO: GETTING STARTED WITH RTL8722DM MINI

…步驟2: 安裝驅動程序 首先,通過Micro USB將AMB23 連接到電腦: 如果這是您第一次將AMB23連接到您的電腦,那麼AMB23I的USB驅動程序將自動安裝。 如果遇到開發板連接到電腦的驅動程序問題,請參考下列USB 驅動程序 https://ftdichip.com/drivers /。 你可以在你電腦的裝置管理員中檢查COM端口號: 步驟2: 設置Arduino IDE 從1.6.5版本開始,Arduino IDE支持第三方硬件。因此,我們可以使用Arduino IDE在AMB23上開發應用程序。 請參考 basic example link: Arduino IDE可以在Arduino網站下載: https://www.arduino.cc/en/Main/Software 安裝完成後,打開Arduino IDE。為了在Arduino IDE中正常使用AMB23,請打開“File”—>“Preferences”。 並將以下網址粘貼到 “Additional Boards…

Read More »

BLEAddr Class

…Constructs a BLEAddr object. Syntax BLEAddr(void); BLEAddr(uint8_t (&addr)[6]); BLEAddr(const char * str); Parameters addr: An array of 6 bytes containing the desired Bluetooth address. str: desired Bluetooth address represented in…

Read More »

Ameba ARDUINO: Getting Started with AMB25

…Arduino IDE用於在開發板上開發應用程序,以及Arduino基本範例(請參考 basic example link)。 Arduino IDE 可以在 Arduino 網站下載: https://www.arduino.cc/en/Main/Software 安裝完成後,打開Arduino IDE。請打開 “File” -> “Preferences”. 並將以下 URL 複製到 “Additional Boards Manager URLs” 欄位: https://github.com/ambiot/ambd_arduino/raw/master/Arduino_package/package_realtek_amebad_index.json 接下來,打開 “Tools” -> “Board” ->…

Read More »

Ameba ARDUINO: Getting Started with AW-CU488 Thing Plus (RTL8721DM)

IDE 支持第三方硬件。 Arduino IDE用於在開發板上開發應用程序,以及Arduino基本範例。 Arduino IDE 可以在 Arduino 網站下載: https://www.arduino.cc/en/Main/Software。 安裝完成後,打開Arduino IDE。請打開 “File” -> “Preferences”。 並將以下 URL 複製到 “Additional Boards Manager URLs” 欄位: https://github.com/ambiot/ambd_arduino/raw/master/Arduino_package/package_realtek_amebad_index.json 接下來,打開 “Tools” -> “Board” -> “Boards…

Read More »

GTimerClass Class

…immediately. Syntax void begin(uint32_t timerid, uint32_t duration_us, void (*handler)(uint32_t), bool periodical = true, uint32_t userdata = 0); Parameters timerid: There are 5 valid GTimer with timer id 0~4. duration_us: The…

Read More »

Detect PM2.5 concentration in the air

…Reset的作用是讓PMS3003 reset TX/RX這兩根pin是UART的pin,PMS3003在工作模式下,會不停地輸出讀到的數據,每筆數據的長度是32 byte,資料格式可以參考:https://www.dfrobot.com/wiki/index.php?title=PM2.5_laser_dust_sensor_SKU:SEN0177 接線的方式如下圖: RTL8710 接線的方式如下圖: 這個例子裡並沒有接Set與Reset這兩根pin 上傳程式碼之後,按下Ameba的Reset按鈕,並且開啟Serial Monitor,就可以看到讀到的PM 2.5數據 解決方案 IoT SoC / MCU Video SoC 開發者專區 購買開發版 Standard SDK Ameba ARDUINO AWS IoT ExpressLink Amazon FreeRTOS Arm…

Read More »

SPI – Print image and text on LCD screen

…TFT LCD,基本上大同小異,唯一要注意的地方是可接受的SPI clock rate,這點需要看該項LCD的產品規格來確認。 範例說明 手邊已測試過兩款ILI9341 TFT LCD with SPI interface,分別是 Adafruit出產的8吋TFT LCD含觸控的螢幕 https://www.adafruit.com/products/1651 https://learn.adafruit.com/adafruit-2-8-tft-touch-shield-v2?view=all QVGA 2.2吋TFT LCD http://www.elecfreaks.com/wiki/index.php?title=2.2S%22_TFT_LCD:_TFT01-2.2S 常見的ILI9341 TFT LCD with SPI interface有底下這些Pin角 MOSI: 標準的SPI Pin 腳 MISO:…

Read More »

Ameba Arduino: [RTL8195AM] Let Ameba post articles on Facebook wall

…1. 根據Graph API文件,每次使用token,Facebook會在不固定的時間重置long-lived token 為2個月,所以只要應用程式一直有在使用,就不用擔心過期的問題 https://developers.facebook.com/docs/facebook-login/access-tokens/expiration-and-extension 但如果一直都沒使用並且token到期,就得重新執行索取token的動作,新的token的值不會與舊的相同 2. 我們可以不經由Graph API explorer取得short-lived token或long-lived token。細節可以參考Graph API文件 https://developers.facebook.com/docs/facebook-login/manually-build-a-login-flow 在社團或粉絲團塗鴉牆發表文章 這部份其實跟在自己塗鴨牆發表文章很像,只是我們需要社團的group id。進入社團頁面之後,可以在網址列上看到社團的group id,以底下的例子來說是 “1210426395661463” 如果社團或粉絲團曾經修改過名稱,可以藉由一些網站來幫忙找group id: http://lookup-id.com/ http://wallflux.com/facebook_id/ 接著我們使用 Graph API Explorer填入以下的值 HTTP REQ…

Read More »

Use WS2812B 4×4 RGB LED

…NUM_LEDS); 初始化ws2812b,並且預先建構Ameba的訊號輸出腳位及ws2812b裡LED的總數。 ledstrip.begin(); ws2812b開始運作。 ledstrip.setPixelColor(5,0,10,0); 點亮編號5的LED為綠色 ledstrip.setPixelColor(2,0,0,10); 點亮編號2的LED為藍色 ledstrip.setPixelColor(1,10,10,10); 點亮編號1的LED為白熾色 ledstrip.setPixelColor(3,10,0,0); 點亮編號3的LED為紅色 ledstrip.setPixelColor(8,10,0,0); 點亮編號8的LED為紅色 使用setPixelColor(index, Red, Green, Blue)來點亮ws2812b的Led,需注意的是,模組內的LED編號由0開始,可參考下圖列出LED在模組內的編號。 ledstrip.show(); 開始點亮指定的LED。 解決方案 IoT SoC / MCU Video SoC 開發者專區 購買開發版 Standard…

Read More »

UART – PM2.5 Concentration in The Air

…“File” -> “Examples” -> “AmebaSoftwareSerial” -> “PMS3003_AirQuality” 接線的部份,PMS3003一共有8根pin: 它的VCC需要接到5V的電源, 但內部IC的工作電壓是3.3V, 所以Reset, TX, RX, Set的工作電壓都是3.3V, Set這根pin如果對它pull high, 可以讓PMS3003處於工作模式, 如果對它pull low, 則讓它處於standby mode Reset的作用是讓PMS3003 reset TX/RX這兩根pin是UART的pin,PMS3003在工作模式下,會不停地輸出讀到的數據,每筆數據的長度是32 bytes,資料格式可以參考: https://www.dfrobot.com/wiki/index.php ?title=PM2.5_laser_dust_sensor_SKU:SEN0177 AMB21/AMB22 AMB23 BW16…

Read More »

GTimerClass Class

…start it immediately. Syntax void begin(uint32_t timerid, uint32_t duration_us, void (*handler)(uint32_t), bool periodical, uint32_t userdata); Parameters timerid: GTimer ID. (There are 5 valid GTimer with timer id 0~4). duration_us: The…

Read More »

WiFiClass Class

…key_idx, const char* key); int begin(char* ssid, const char *passphrase); Parameters ssid: Pointer to the SSID string key_idx: The key index to set. Valid values are 0-3. key: Key input…

Read More »

BLEAddr Class

…Constructs a BLEAddr object. Syntax BLEAddr(void); BLEAddr(uint8_t (&addr)[6]); BLEAddr(const char * str); Parameters addr: An array of 6 bytes containing the desired Bluetooth address. str: desired Bluetooth address represented in…

Read More »

PMUClass Class

…duration in days. Minimum valid value from 0. Valid value must be or greater than 0. duration_h: set the duration in hours. Minimum valid value from 0. Valid value must…

Read More »

Ameba ARDUINO: Getting Started with RTL8722

…步驟2: 安裝驅動程序 首先,通過Micro USB將AMB21/AMB22連接到電腦: 如果這是您第一次將AMB21/AMB22連接到您的電腦,那麼AMB21/AMB22的USB驅動程序將自動安裝。 如果遇到開發板連接到電腦的驅動程序問題,請參考下列USB 驅動程序https:// ftdichip.com/drivers /。 在你的電腦的設備管理器中檢查COM端口號: 步驟3: 設置Arduino IDE 從1.6.5版本開始,Arduino IDE支持第三方硬件。因此,我們可以使用Arduino IDE在AmebaD上開發應用程序,Arduino的示例也可以在AMB21/AMB22上運行。 Arduino IDE可以在Arduino網站下載: https://www.arduino.cc/en/Main/Software 安裝完成後,打開Arduino IDE。為了在Arduino IDE中正常使用AMB21/AMB22,請打開“File”—>“Preferences”。 並將以下網址粘貼到 “Additional Boards Manager URLs” 欄位: https://github.com/ambiot/ambd_arduino/raw/master/Arduino_package/package_realtek_amebad_index.json 接下來,選擇…

Read More »

WS2812B Class

…Check for correct SPI MOSI pin settings and prepare to drive the WS2812B. Syntax void begin(void); Parameters NA Returns NA Example Code Example: WS2812B_Basics (https://github.com/ambiot/ambd_arduino/blob/dev/Arduino_package/hardware/libraries/WS2812B/examples/WS2812B_Basics/WS2812B_Basics.ino) Notes and Warnings Only SPI…

Read More »
Please confirm that QQ communication software is installed
請先確認已安裝QQ通訊軟體