Search Results

FatfsSDIO – Read and open HTML file from SD card

…卡插入电脑,将 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, open a browser to…

Read More »

FaceDetection Class

…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 detected faces…

Read More »

File System – Read and display HTML file from SD 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。 建立连接后,串口监视器将打印消息 “To see…

Read More »

ObjectDetection Class

…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 function returns…

Read More »

VideoStreamOverlay Class

…streams. Syntax void update(int ch, int idx = 0); Parameters ch: Channel to display drawings. (Valid value: 0,1,2) idx: Layer index of OSD. The default value is 0. (Valid value:…

Read More »

WiFiClass Class

…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 This function…

Read More »

WiFiClass Class

…uint8_t hidden_ssid); int apbegin(char* ssid, char* password, char* channel, uint8_t hidden_ssid); Parameters ssid: SSID of the AP network channel: AP’s channel (Default value: 1) password: AP’s password hidden_ssid: hidden SSID

Read More »

Amazon Alexa

…– 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 ID Kill ID设定好之后,接着要将Function一起设定完成,将页面拉至最下方,点击“Create…

Read More »

Audio Classification Class

…function to receive audio classification results NNAudioClassification::getResultCount Get number of audio classification results NNAudioClassification::getResult Get audio classification results AudioClassificationResult::classID Description Get class ID of recognized audio. Syntax int classID(void); Parameters…

Read More »

MotionDetection Class

…“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 result to…

Read More »

FaceDetectionRecognition 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 specified, the…

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); 解决方案…

Read More »

BLEUUID Class

…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 a UUID

Read More »

BLEUUID Class

…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 a UUID

Read More »

Solar panel – Upload Temperature and Humidity Data To LASS System

…另一个值得注意的是,图中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的应用程式,如果你的Andr​​oid手机已经打开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的距离做实验。 我们测量太阳能板实际供电的情况,当照度为100k LUX的时候,可以输出210mA的电流,电压为4.8V,4.8V x…

Read More »

E-paper – Display User-generated QR code

…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 for generating QR codes in C, optimized for…

Read More »

E-Paper – Display User-Generated QR Code

…根据需要修改 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 中生成 QR 码的库,针对处理和内存受限系统进行了优化: https://github.com/ricmoo/QRCode#data-capacities 解决方案 IoT…

Read More »

E-Paper – Display Images

…“DisplayQR” 范例 “File” → “Examples” → “AmebaEink” → “EinkDisplayImage”: 上传范例代码后按重置按钮,您需要等待大约 1-2 秒,e-Paper模块才能刷新屏幕。然后屏幕会先开始显示图像 5 秒,然后每 5 秒会显示 3 个不同的二维码(如下图所示,您可以扫描二维码了解更多信息)。最后,以 3 帧形式出现的 gif 将显示几秒钟。 程式码说明 [1] 我们使用Good Display GDEH029A1 2.9英寸/ 296×128解析度/部分刷新Arduino范例代码来成功获取e-Paper显示: http://www.good-display.com/product/201.html

Read More »

MQTT – Use Amazon AWS IoT Shadow Service

…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 (strstr(topic, “/shadow/get/accepted”) != NULL) { 如果存在,则消息来自控制端。如果消息中的属性状态不同于当前状态,请发布新状态。 updateLedState(desired_led_state); 解决方案 IoT SoC / MCU Video SoC 开发者专区 购买开发版 Standard…

Read More »

E-Paper – Display Images

…e-Paper 模组(B)的范例,前往“File”→“Examples”→“AmebaEink”→“EPD_2in9b”->“EinkDisplayImages”了解如何显示红色图像。 2.9 英寸模块 (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] 可参考 EPD 库: https://github.com/waveshare/e-Paper…

Read More »

Amazon Service

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); 设定Client ID,Client…

Read More »

GPIO – Using DS18B20 thermometer

…Ameba MakerPro AmebaIoT Worldwide 登入 选择语言 简体中文 繁體中文 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 »

Ameba ARDUINO: Getting Started with AMB82 MINI (RTL8735B)

…支持第三方硬件。因此,我们可以使用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 Manager”大约需要10~20秒钟来刷新所有硬件文件(如果网络状况不好,可能需要更长的时间)。每次与新硬体重新连接时,需要重新开启Board Manager。在列表中找到“Realtek…

Read More »

Ameba ARDUINO: Getting Started with BW16/RTL8720DN

…从 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 复制到 “Additional Boards Manager URLs”…

Read More »

DHT Class

…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 isFahrenheit); float…

Read More »

Ameba ARDUINO: Getting Started with BW16 type C

…任何 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 link)。 Arduino IDE 可以在 Arduino 网站下载: https://www.arduino.cc/en/Main/Software…

Read More »

IR – Transmit IR Sony Data

…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 AWS IoT…

Read More »

DHT Class

…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 isFahrenheit); float…

Read More »

DHT Class

…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 percentHumidity: humidity…

Read More »

IR – Transmit IR NEC Raw Data and Decode

…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 Amazon FreeRTOS…

Read More »

Ameba ARDUINO: Getting Started with RTL8195

…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版之后,支援第三方的硬体,因此我们可以在Ar​​duino IDE上开发Ameba,并共享Arduino上面的范例程式。在Arduino官方网站上可以找到下载程式: https://www.arduino.cc/en/Main/Software 安装完之后,打开Arduino IDE,为了让Arduino IDE找到Ameba的设定档,先到 “File” -> “Preferences” 在Additional Boards Manager URLs 填入: Arduino…

Read More »

BLEService Class

…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, expressed as…

Read More »

BLEService Class

…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, expressed as…

Read More »

Ameba ARDUINO: Getting Started with RTL8710

…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的设定档,先到 “File” -> “Preferences”…

Read More »

Ameba ARDUINO: Release History

…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 Feature: –…

Read More »

Ameba MicroPython: Getting Started with BW16

…上传模式需要依靠开发板上的擦除快闪或上传固件。 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 <class ‘Pin’> is of type type id — init…

Read More »

Ameba MicroPython: Getting Started with BW16 Type C

…“Burn” 2. Press then release “RST” 3. Release “Burn” 上传模式需要依靠开发板上的擦除快闪或上传固件。 BW16 Type C 有自动上传电路。它可以跳过手动进入上传模式。 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(您感兴趣的模块)来获取该模块的详细信息。…

Read More »

E-Paper – Display Text

…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] 可参考 EPD 库: https://github.com/waveshare/e-Paper 解决方案 IoT…

Read More »

WiFi – Concurrent Mode

…模式,是一种允许设备同时作为无线存取点和 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工具: https://www.netspotapp.com/download- win.html 接下来上传范例代码并按 Ameba…

Read More »

Ameba MicroPython: Getting Started with RTL8722

…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 PB3 ✓ A6…

Read More »

IRDevice Class

…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 transmitPin, uint32_t…

Read More »

Using modbus TCP communication protocol

…Ameba MakerPro AmebaIoT Worldwide 登入 选择语言 简体中文 繁體中文 English Search Search 使用 modbus TCP 工业通讯协定 材料准备 Ameba x 1 范例说明 Modbus是一种通信协定,可以实作在各种不同的介面上,像是Serial、Ethernet、Wifi。这个范例里我们会使用Ameba透过wifi TCP实作Modbus TCP。 Modbus的角色有Master与Slave。 Master发起命令,而Slave回应讯息。这里Ameba扮演Slave的角色,而Master会尝试读取Ameba上面的资料。 下载Modbus tool Modbus相关的程式很多,这里我们使用modpoll这个command line工具,它目前是免费的,相关的文件可以在这个网站上找到: http://www.modbusdriver.com/modpoll.html

Read More »

E-Paper – Display Text

…将代码上传到开发板,上传完成后按重置按钮。就可以看到这些文字: 程式码说明 [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 Amazon FreeRTOS Arm Mbed Enabled…

Read More »

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

…(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格式)。 3. Ameba接音量旋钮 (optional) 可选用一个线性电位计调节耳机输出音量大小,连接电位计的1端和3端(视电位计本身而定)分别至V3.3和GND,连接2端到Ameba开发板A2。Ameba通过ADC采集A2端口的电压信号,转换为音量信号,以调节codec的耳机输出音量。 开启Audio…

Read More »

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

…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” 2….

Read More »

Ameba ARDUINO: Getting Started with AMB25

…(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 link)。 Arduino IDE 可以在…

Read More »

Ameba ARDUINO: Getting Started with AMB26

…位元、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 link)。 Arduino…

Read More »

UART – PM2.5 Concentration in The Air

…“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 BW16 type…

Read More »

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

…根据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 type:…

Read More »

Use WS2812B 4×4 RGB LED

…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 SDK Ameba ARDUINO…

Read More »

Detect PM2.5 concentration in the air

…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 Mbed Enabled…

Read More »

SPI – Print image and text on LCD screen

…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: 标准的USB Pin 脚 MISO: 标准的SPI Pin…

Read More »

WiFiClass Class

…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 buffer. passphrase:…

Read More »

BLEAddr Class

…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 character string….

Read More »

PMUClass Class

…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 be or…

Read More »

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

…OS 32 位元或 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基本范例。…

Read More »

WS2812B Class

…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 MOSI pin…

Read More »

Ameba ARDUINO: Getting Started with RTL8722DM MINI

…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 Manager URLs” 栏位: https://github.com/ambiot/ambd_arduino/raw/master/Arduino_package/package_realtek_amebad_index.json…

Read More »

Ameba ARDUINO: Getting Started with RTL8722

…首先,通过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 接下来,选择 “Tools” ->…

Read More »

BLEAddr Class

…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 character string….

Read More »

GTimerClass Class

…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 duration of…

Read More »

GTimerClass Class

…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 duration of…

Read More »
请先确认已安装QQ通讯软体