From 9bbb65df5320b72e8b430e7f8a77c317eee31a71 Mon Sep 17 00:00:00 2001 From: Kevin Loo Keng Leong Date: Wed, 23 Apr 2025 15:11:27 +0800 Subject: [PATCH] Update AmebaD documentation --- .gitignore | 170 ++++++++++++++ .../Debugging - Using the Debug Interface.rst | 210 +++++++++--------- .../Example_Guides/Debugging/index.rst | 14 +- ... Over-the-Air Firmware Update via HTTP.rst | 2 +- ...Paper - Display User-generated QR Code.rst | 1 - ... Over-the-Air Firmware Update via HTTP.rst | 201 ----------------- .../amb21/Example_Guides/OTA/index.rst | 7 - .../TensorFlow Lite - Person Detection.rst | 1 - .../USB/USB - CDC Serial Port.rst | 1 - .../Example_Guides/USB/USB - HID Keyboard.rst | 1 - source/ameba_d/amb21/Example_Guides/index.rst | 1 - ...Paper - Display User-generated QR Code.rst | 1 - ... Over-the-Air Firmware Update via HTTP.rst | 201 ----------------- .../amb23/Example_Guides/OTA/index.rst | 7 - .../TensorFlow Lite - Person Detection.rst | 1 - .../Example_Guides/USB/USB - HID Keyboard.rst | 1 - source/ameba_d/amb23/Example_Guides/index.rst | 1 - ...Paper - Display User-generated QR Code.rst | 1 - .../amb25/Example_Guides/OTA/index.rst | 7 - source/ameba_d/amb25/Example_Guides/index.rst | 1 - ...Paper - Display User-generated QR Code.rst | 1 - ... Over-the-Air Firmware Update via HTTP.rst | 201 ----------------- .../amb26/Example_Guides/OTA/index.rst | 7 - source/ameba_d/amb26/Example_Guides/index.rst | 1 - ...Paper - Display User-generated QR Code.rst | 1 - ... Over-the-Air Firmware Update via HTTP.rst | 201 ----------------- .../aw-cu488/Example_Guides/OTA/index.rst | 7 - .../TensorFlow Lite - Person Detection.rst | 1 - .../ameba_d/aw-cu488/Example_Guides/index.rst | 1 - ...Paper - Display User-generated QR Code.rst | 1 - ... Over-the-Air Firmware Update via HTTP.rst | 201 ----------------- .../bw16-typeb/Example_Guides/OTA/index.rst | 7 - .../bw16-typeb/Example_Guides/index.rst | 1 - ...Paper - Display User-generated QR Code.rst | 1 - ... Over-the-Air Firmware Update via HTTP.rst | 201 ----------------- .../bw16-typec/Example_Guides/OTA/index.rst | 7 - .../bw16-typec/Example_Guides/index.rst | 1 - .../Multimedia AI/Text-to-Speech NTP.rst | 2 + .../Multimedia AI/Text-to-Speech.rst | 2 + .../Neural Network/Multimedia AI/index.rst | 2 +- source/custom_script.py | 14 +- 41 files changed, 295 insertions(+), 1396 deletions(-) create mode 100644 .gitignore rename {source/_common/ameba_d => bak/ambd/_common}/Example_Guides/Debugging/Debugging - Using the Debug Interface.rst (97%) rename {source/_common/ameba_d => bak/ambd/_common}/Example_Guides/Debugging/index.rst (92%) rename source/{ameba_d/amb25 => _common/ameba_d}/Example_Guides/OTA/Ameba Over-the-Air Firmware Update via HTTP.rst (99%) delete mode 100644 source/ameba_d/amb21/Example_Guides/OTA/Ameba Over-the-Air Firmware Update via HTTP.rst delete mode 100644 source/ameba_d/amb21/Example_Guides/OTA/index.rst delete mode 100644 source/ameba_d/amb23/Example_Guides/OTA/Ameba Over-the-Air Firmware Update via HTTP.rst delete mode 100644 source/ameba_d/amb23/Example_Guides/OTA/index.rst delete mode 100644 source/ameba_d/amb25/Example_Guides/OTA/index.rst delete mode 100644 source/ameba_d/amb26/Example_Guides/OTA/Ameba Over-the-Air Firmware Update via HTTP.rst delete mode 100644 source/ameba_d/amb26/Example_Guides/OTA/index.rst delete mode 100644 source/ameba_d/aw-cu488/Example_Guides/OTA/Ameba Over-the-Air Firmware Update via HTTP.rst delete mode 100644 source/ameba_d/aw-cu488/Example_Guides/OTA/index.rst delete mode 100644 source/ameba_d/bw16-typeb/Example_Guides/OTA/Ameba Over-the-Air Firmware Update via HTTP.rst delete mode 100644 source/ameba_d/bw16-typeb/Example_Guides/OTA/index.rst delete mode 100644 source/ameba_d/bw16-typec/Example_Guides/OTA/Ameba Over-the-Air Firmware Update via HTTP.rst delete mode 100644 source/ameba_d/bw16-typec/Example_Guides/OTA/index.rst diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..68dd343 --- /dev/null +++ b/.gitignore @@ -0,0 +1,170 @@ +build* + +source/_tags/ +source/ameba_d/amb21/API_Documents/ +source/ameba_d/amb23/API_Documents/ +source/ameba_d/amb25/API_Documents/ +source/ameba_d/amb26/API_Documents/ +source/ameba_d/aw-cu488/API_Documents/ +source/ameba_d/bw16-typeb/API_Documents/ +source/ameba_d/bw16-typec/API_Documents/ + +source/ameba_d/amb21/Example_Guides/BLE/ +source/ameba_d/amb23/Example_Guides/BLE/ +source/ameba_d/amb25/Example_Guides/BLE/ +source/ameba_d/amb26/Example_Guides/BLE/ +source/ameba_d/aw-cu488/Example_Guides/BLE/ +source/ameba_d/bw16-typeb/Example_Guides/BLE/ +source/ameba_d/bw16-typec/Example_Guides/BLE/ + +source/ameba_d/amb21/Example_Guides/Flash Memory/ +source/ameba_d/amb23/Example_Guides/Flash Memory/ +source/ameba_d/amb25/Example_Guides/Flash Memory/ +source/ameba_d/amb26/Example_Guides/Flash Memory/ +source/ameba_d/aw-cu488/Example_Guides/Flash Memory/ +source/ameba_d/bw16-typeb/Example_Guides/Flash Memory/ +source/ameba_d/bw16-typec/Example_Guides/Flash Memory/ + +source/ameba_d/amb21/Example_Guides/GPIO/ +source/ameba_d/amb23/Example_Guides/GPIO/ +source/ameba_d/amb25/Example_Guides/GPIO/ +source/ameba_d/amb26/Example_Guides/GPIO/ +source/ameba_d/aw-cu488/Example_Guides/GPIO/ +source/ameba_d/bw16-typeb/Example_Guides/GPIO/ +source/ameba_d/bw16-typec/Example_Guides/GPIO/ + +source/ameba_d/amb21/Example_Guides/GTimer/ +source/ameba_d/amb23/Example_Guides/GTimer/ +source/ameba_d/amb25/Example_Guides/GTimer/ +source/ameba_d/amb26/Example_Guides/GTimer/ +source/ameba_d/aw-cu488/Example_Guides/GTimer/ +source/ameba_d/bw16-typeb/Example_Guides/GTimer/ +source/ameba_d/bw16-typec/Example_Guides/GTimer/ + +source/ameba_d/amb21/Example_Guides/HTTP/ +source/ameba_d/amb23/Example_Guides/HTTP/ +source/ameba_d/amb25/Example_Guides/HTTP/ +source/ameba_d/amb26/Example_Guides/HTTP/ +source/ameba_d/aw-cu488/Example_Guides/HTTP/ +source/ameba_d/bw16-typeb/Example_Guides/HTTP/ +source/ameba_d/bw16-typec/Example_Guides/HTTP/ + +source/ameba_d/amb21/Example_Guides/I2C/ +source/ameba_d/amb23/Example_Guides/I2C/ +source/ameba_d/amb25/Example_Guides/I2C/ +source/ameba_d/amb26/Example_Guides/I2C/ +source/ameba_d/aw-cu488/Example_Guides/I2C/ +source/ameba_d/bw16-typeb/Example_Guides/I2C/ +source/ameba_d/bw16-typec/Example_Guides/I2C/ + +source/ameba_d/amb21/Example_Guides/IPv6/ +source/ameba_d/amb23/Example_Guides/IPv6/ +source/ameba_d/amb25/Example_Guides/IPv6/ +source/ameba_d/amb26/Example_Guides/IPv6/ +source/ameba_d/aw-cu488/Example_Guides/IPv6/ +source/ameba_d/bw16-typeb/Example_Guides/IPv6/ +source/ameba_d/bw16-typec/Example_Guides/IPv6/ + +source/ameba_d/amb21/Example_Guides/MDNS/ +source/ameba_d/amb23/Example_Guides/MDNS/ +source/ameba_d/amb25/Example_Guides/MDNS/ +source/ameba_d/amb26/Example_Guides/MDNS/ +source/ameba_d/aw-cu488/Example_Guides/MDNS/ +source/ameba_d/bw16-typeb/Example_Guides/MDNS/ +source/ameba_d/bw16-typec/Example_Guides/MDNS/ + +source/ameba_d/amb21/Example_Guides/MQTT/ +source/ameba_d/amb23/Example_Guides/MQTT/ +source/ameba_d/amb25/Example_Guides/MQTT/ +source/ameba_d/amb26/Example_Guides/MQTT/ +source/ameba_d/aw-cu488/Example_Guides/MQTT/ +source/ameba_d/bw16-typeb/Example_Guides/MQTT/ +source/ameba_d/bw16-typec/Example_Guides/MQTT/ + +source/ameba_d/amb21/Example_Guides/NTP/ +source/ameba_d/amb23/Example_Guides/NTP/ +source/ameba_d/amb25/Example_Guides/NTP/ +source/ameba_d/amb26/Example_Guides/NTP/ +source/ameba_d/aw-cu488/Example_Guides/NTP/ +source/ameba_d/bw16-typeb/Example_Guides/NTP/ +source/ameba_d/bw16-typec/Example_Guides/NTP/ + +source/ameba_d/amb21/Example_Guides/OTA/ +source/ameba_d/amb23/Example_Guides/OTA/ +source/ameba_d/amb25/Example_Guides/OTA/ +source/ameba_d/amb26/Example_Guides/OTA/ +source/ameba_d/aw-cu488/Example_Guides/OTA/ +source/ameba_d/bw16-typeb/Example_Guides/OTA/ +source/ameba_d/bw16-typec/Example_Guides/OTA/ + +source/ameba_d/amb21/Example_Guides/Power Save/ +source/ameba_d/amb23/Example_Guides/Power Save/ +source/ameba_d/amb25/Example_Guides/Power Save/ +source/ameba_d/amb26/Example_Guides/Power Save/ +source/ameba_d/aw-cu488/Example_Guides/Power Save/ +source/ameba_d/bw16-typeb/Example_Guides/Power Save/ +source/ameba_d/bw16-typec/Example_Guides/Power Save/ + +source/ameba_d/amb21/Example_Guides/PWM/ +source/ameba_d/amb23/Example_Guides/PWM/ +source/ameba_d/amb25/Example_Guides/PWM/ +source/ameba_d/amb26/Example_Guides/PWM/ +source/ameba_d/aw-cu488/Example_Guides/PWM/ +source/ameba_d/bw16-typeb/Example_Guides/PWM/ +source/ameba_d/bw16-typec/Example_Guides/PWM/ + +source/ameba_d/amb21/Example_Guides/RTC/ +source/ameba_d/amb23/Example_Guides/RTC/ +source/ameba_d/amb25/Example_Guides/RTC/ +source/ameba_d/amb26/Example_Guides/RTC/ +source/ameba_d/aw-cu488/Example_Guides/RTC/ +source/ameba_d/bw16-typeb/Example_Guides/RTC/ +source/ameba_d/bw16-typec/Example_Guides/RTC/ + +source/ameba_d/amb21/Example_Guides/SPI/ +source/ameba_d/amb23/Example_Guides/SPI/ +source/ameba_d/amb25/Example_Guides/SPI/ +source/ameba_d/amb26/Example_Guides/SPI/ +source/ameba_d/aw-cu488/Example_Guides/SPI/ +source/ameba_d/bw16-typeb/Example_Guides/SPI/ +source/ameba_d/bw16-typec/Example_Guides/SPI/ + +source/ameba_d/amb21/Example_Guides/SYS/ +source/ameba_d/amb23/Example_Guides/SYS/ +source/ameba_d/amb25/Example_Guides/SYS/ +source/ameba_d/amb26/Example_Guides/SYS/ +source/ameba_d/aw-cu488/Example_Guides/SYS/ +source/ameba_d/bw16-typeb/Example_Guides/SYS/ +source/ameba_d/bw16-typec/Example_Guides/SYS/ + +source/ameba_d/amb21/Example_Guides/UART/ +source/ameba_d/amb23/Example_Guides/UART/ +source/ameba_d/amb25/Example_Guides/UART/ +source/ameba_d/amb26/Example_Guides/UART/ +source/ameba_d/aw-cu488/Example_Guides/UART/ +source/ameba_d/bw16-typeb/Example_Guides/UART/ +source/ameba_d/bw16-typec/Example_Guides/UART/ + +source/ameba_d/amb21/Example_Guides/WDT/ +source/ameba_d/amb23/Example_Guides/WDT/ +source/ameba_d/amb25/Example_Guides/WDT/ +source/ameba_d/amb26/Example_Guides/WDT/ +source/ameba_d/aw-cu488/Example_Guides/WDT/ +source/ameba_d/bw16-typeb/Example_Guides/WDT/ +source/ameba_d/bw16-typec/Example_Guides/WDT/ + +source/ameba_d/amb21/Example_Guides/WiFi/ +source/ameba_d/amb23/Example_Guides/WiFi/ +source/ameba_d/amb25/Example_Guides/WiFi/ +source/ameba_d/amb26/Example_Guides/WiFi/ +source/ameba_d/aw-cu488/Example_Guides/WiFi/ +source/ameba_d/bw16-typeb/Example_Guides/WiFi/ +source/ameba_d/bw16-typec/Example_Guides/WiFi/ + +source/ameba_d/amb21/Example_Guides/WS2812B/ +source/ameba_d/amb23/Example_Guides/WS2812B/ +source/ameba_d/amb25/Example_Guides/WS2812B/ +source/ameba_d/amb26/Example_Guides/WS2812B/ +source/ameba_d/aw-cu488/Example_Guides/WS2812B/ +source/ameba_d/bw16-typeb/Example_Guides/WS2812B/ +source/ameba_d/bw16-typec/Example_Guides/WS2812B/ \ No newline at end of file diff --git a/source/_common/ameba_d/Example_Guides/Debugging/Debugging - Using the Debug Interface.rst b/bak/ambd/_common/Example_Guides/Debugging/Debugging - Using the Debug Interface.rst similarity index 97% rename from source/_common/ameba_d/Example_Guides/Debugging/Debugging - Using the Debug Interface.rst rename to bak/ambd/_common/Example_Guides/Debugging/Debugging - Using the Debug Interface.rst index 01fa15c..53930f6 100644 --- a/source/_common/ameba_d/Example_Guides/Debugging/Debugging - Using the Debug Interface.rst +++ b/bak/ambd/_common/Example_Guides/Debugging/Debugging - Using the Debug Interface.rst @@ -1,105 +1,105 @@ -Debugging - Using the Debug Interface -===================================== - -.. contents:: - :local: - :depth: 2 - -Materials ---------- - -- AmebaD [AMB21 / AMB22 / AMB23 / AMB25 / AMB26 / BW16 / AW-CU488 Thing Plus] x 1 - -- SEGGER debug probe x 1 - -Example -------- - -Using the debugging feature available in the Arduino 2.0 IDE to debug your board. In this example, we will use SEGGER's debug probe with Arduino IDE's debug interface. Begin by installing the SEGGER debugging software. This can be found on SEGGER's official website: https://www.segger.com/downloads/jlink/ - -Before debugging, ensure that the code is optimized for debugging. Enable it by navigating to Sketch -> Optimize for Debugging. - -|image01| - -Open the Debug example, “File” -> “Examples” -> “Debugging” -> “ExampleDebug” - -|image02| - -Two files will open in the IDE; ExampleDebug.ino and debug_custom.json. Click on debug_custom.json. Under “serverArgs”, insert the directory path to Arduino15 folder, as well as the current version number of the tools folder. - -|image03| - -Connect the JLink Debug Probe and AmebaD board to the computer. Refer to the table below for the wiring connection between JLink Debug Probe and AmebaD board. For more information, please refer to: https://www.segger.com/products/debug-probes/j-link/technology/interface-description/ - -+---------------------------+-----------------------+ -| **JLink Debug Probe** | **AmebaD Boards** | -+===========================+=======================+ -| VTref | 3.3V | -+---------------------------+-----------------------+ -| GND | GND | -+---------------------------+-----------------------+ -| SWDIO | SWDIO | -+---------------------------+-----------------------+ -| SWCLK | SWCLK | -+---------------------------+-----------------------+ - -|image04| - -|image05| - -AmebaD boards only have 2 hardware breakpoints. Setting more than that will cause debugging to fail. Hardware breakpoints can be set at the left of the code and are indicated by a red dot shown in line 42. You will need to stop debugging and reset if this happens. - -If 2 hardware breakpoint is not enough, software breakpoint can be used. Either of the instructions ``(__BKPT() or __asm__("BKPT"))`` can be used to add a software breakpoint in the program execution. - -|image06| - -Upload the code and press the reset button on Ameba once the upload is finished. - -Once uploading is completed, reset the board. Start debugging by selecting the Debug button. This is located to the right of the upload button. Arduino will proceed with opening a gdb-server tab in the same window as the output window if all connections were connected correctly between JLink and board. This can sometimes take up to 10 seconds to set up. - -|image07| - -The line highlighted in yellow indicates which line of code the program is currently halted at. Debug console will appear to show the debugging information. - -|image08| - -To continue running the code after the breakpoint, use any of the single-stepping functions highlighted in the red box above (continue, step over, step into, step out, restart, stop) - -.. note :: For AmebaD boards, using any of the single-stepping functionality requires both hardware breakpoint resources to be free. You should remove or disable all existing breakpoints before using them. - -|image09| - -.. |image01| image:: ../../../../_static/amebad/Example_Guides/Debugging/Debugging_Using_the_Debug_Interface/image01.png - :width: 1265 px - :height: 542 px - :scale: 70% -.. |image02| image:: ../../../../_static/amebad/Example_Guides/Debugging/Debugging_Using_the_Debug_Interface/image02.png - :width: 1266 px - :height: 1040 px - :scale: 70% -.. |image03| image:: ../../../../_static/amebad/Example_Guides/Debugging/Debugging_Using_the_Debug_Interface/image03.png - :width: 1813 px - :height: 457 px - :scale: 40% -.. |image04| image:: ../../../../_static/amebad/Example_Guides/Debugging/Debugging_Using_the_Debug_Interface/image04.png - :width: 500 px - :height: 500 px -.. |image05| image:: ../../../../_static/amebad/Example_Guides/Debugging/Debugging_Using_the_Debug_Interface/image05.png - :width: 3264 px - :height: 2448 px - :scale: 20% -.. |image06| image:: ../../../../_static/amebad/Example_Guides/Debugging/Debugging_Using_the_Debug_Interface/image06.png - :width: 1266 px - :height: 831 px - :scale: 70% -.. |image07| image:: ../../../../_static/amebad/Example_Guides/Debugging/Debugging_Using_the_Debug_Interface/image07.png - :width: 1256 px - :height: 711 px - :scale: 70% -.. |image08| image:: ../../../../_static/amebad/Example_Guides/Debugging/Debugging_Using_the_Debug_Interface/image08.png - :width: 1365 px - :height: 728 px - :scale: 70% -.. |image09| image:: ../../../../_static/amebad/Example_Guides/Debugging/Debugging_Using_the_Debug_Interface/image09.png - :width: 618 px - :height: 459 px +Debugging - Using the Debug Interface +===================================== + +.. contents:: + :local: + :depth: 2 + +Materials +--------- + +- AmebaD [AMB21 / AMB22 / AMB23 / AMB25 / AMB26 / BW16 / AW-CU488 Thing Plus] x 1 + +- SEGGER debug probe x 1 + +Example +------- + +Using the debugging feature available in the Arduino 2.0 IDE to debug your board. In this example, we will use SEGGER's debug probe with Arduino IDE's debug interface. Begin by installing the SEGGER debugging software. This can be found on SEGGER's official website: https://www.segger.com/downloads/jlink/ + +Before debugging, ensure that the code is optimized for debugging. Enable it by navigating to Sketch -> Optimize for Debugging. + +|image01| + +Open the Debug example, “File” -> “Examples” -> “Debugging” -> “ExampleDebug” + +|image02| + +Two files will open in the IDE; ExampleDebug.ino and debug_custom.json. Click on debug_custom.json. Under “serverArgs”, insert the directory path to Arduino15 folder, as well as the current version number of the tools folder. + +|image03| + +Connect the JLink Debug Probe and AmebaD board to the computer. Refer to the table below for the wiring connection between JLink Debug Probe and AmebaD board. For more information, please refer to: https://www.segger.com/products/debug-probes/j-link/technology/interface-description/ + ++---------------------------+-----------------------+ +| **JLink Debug Probe** | **AmebaD Boards** | ++===========================+=======================+ +| VTref | 3.3V | ++---------------------------+-----------------------+ +| GND | GND | ++---------------------------+-----------------------+ +| SWDIO | SWDIO | ++---------------------------+-----------------------+ +| SWCLK | SWCLK | ++---------------------------+-----------------------+ + +|image04| + +|image05| + +AmebaD boards only have 2 hardware breakpoints. Setting more than that will cause debugging to fail. Hardware breakpoints can be set at the left of the code and are indicated by a red dot shown in line 42. You will need to stop debugging and reset if this happens. + +If 2 hardware breakpoint is not enough, software breakpoint can be used. Either of the instructions ``(__BKPT() or __asm__("BKPT"))`` can be used to add a software breakpoint in the program execution. + +|image06| + +Upload the code and press the reset button on Ameba once the upload is finished. + +Once uploading is completed, reset the board. Start debugging by selecting the Debug button. This is located to the right of the upload button. Arduino will proceed with opening a gdb-server tab in the same window as the output window if all connections were connected correctly between JLink and board. This can sometimes take up to 10 seconds to set up. + +|image07| + +The line highlighted in yellow indicates which line of code the program is currently halted at. Debug console will appear to show the debugging information. + +|image08| + +To continue running the code after the breakpoint, use any of the single-stepping functions highlighted in the red box above (continue, step over, step into, step out, restart, stop) + +.. note :: For AmebaD boards, using any of the single-stepping functionality requires both hardware breakpoint resources to be free. You should remove or disable all existing breakpoints before using them. + +|image09| + +.. |image01| image:: ../../../../_static/amebad/Example_Guides/Debugging/Debugging_Using_the_Debug_Interface/image01.png + :width: 1265 px + :height: 542 px + :scale: 70% +.. |image02| image:: ../../../../_static/amebad/Example_Guides/Debugging/Debugging_Using_the_Debug_Interface/image02.png + :width: 1266 px + :height: 1040 px + :scale: 70% +.. |image03| image:: ../../../../_static/amebad/Example_Guides/Debugging/Debugging_Using_the_Debug_Interface/image03.png + :width: 1813 px + :height: 457 px + :scale: 40% +.. |image04| image:: ../../../../_static/amebad/Example_Guides/Debugging/Debugging_Using_the_Debug_Interface/image04.png + :width: 500 px + :height: 500 px +.. |image05| image:: ../../../../_static/amebad/Example_Guides/Debugging/Debugging_Using_the_Debug_Interface/image05.png + :width: 3264 px + :height: 2448 px + :scale: 20% +.. |image06| image:: ../../../../_static/amebad/Example_Guides/Debugging/Debugging_Using_the_Debug_Interface/image06.png + :width: 1266 px + :height: 831 px + :scale: 70% +.. |image07| image:: ../../../../_static/amebad/Example_Guides/Debugging/Debugging_Using_the_Debug_Interface/image07.png + :width: 1256 px + :height: 711 px + :scale: 70% +.. |image08| image:: ../../../../_static/amebad/Example_Guides/Debugging/Debugging_Using_the_Debug_Interface/image08.png + :width: 1365 px + :height: 728 px + :scale: 70% +.. |image09| image:: ../../../../_static/amebad/Example_Guides/Debugging/Debugging_Using_the_Debug_Interface/image09.png + :width: 618 px + :height: 459 px diff --git a/source/_common/ameba_d/Example_Guides/Debugging/index.rst b/bak/ambd/_common/Example_Guides/Debugging/index.rst similarity index 92% rename from source/_common/ameba_d/Example_Guides/Debugging/index.rst rename to bak/ambd/_common/Example_Guides/Debugging/index.rst index 8965f44..a95620e 100644 --- a/source/_common/ameba_d/Example_Guides/Debugging/index.rst +++ b/bak/ambd/_common/Example_Guides/Debugging/index.rst @@ -1,7 +1,7 @@ -Debugging -========= - -.. toctree:: - :maxdepth: 1 - - Debugging - Using the Debug Interface +Debugging +========= + +.. toctree:: + :maxdepth: 1 + + Debugging - Using the Debug Interface diff --git a/source/ameba_d/amb25/Example_Guides/OTA/Ameba Over-the-Air Firmware Update via HTTP.rst b/source/_common/ameba_d/Example_Guides/OTA/Ameba Over-the-Air Firmware Update via HTTP.rst similarity index 99% rename from source/ameba_d/amb25/Example_Guides/OTA/Ameba Over-the-Air Firmware Update via HTTP.rst rename to source/_common/ameba_d/Example_Guides/OTA/Ameba Over-the-Air Firmware Update via HTTP.rst index d8c04ea..c35b4c7 100644 --- a/source/ameba_d/amb25/Example_Guides/OTA/Ameba Over-the-Air Firmware Update via HTTP.rst +++ b/source/_common/ameba_d/Example_Guides/OTA/Ameba Over-the-Air Firmware Update via HTTP.rst @@ -8,7 +8,7 @@ Ameba Over-the-Air Firmware Update via HTTP Materials --------- -- AmebaD [AMB21 / AMB22 / AMB23 / AMB26 / BW16] x 1 +- AmebaD [AMB21 / AMB22 / AMB23 / AMB26 / BW16 / AW-CU488 Thing Plus] x 1 - Set up of Web UI in a PC Example diff --git a/source/ameba_d/amb21/Example_Guides/E-Paper/E-Paper - Display User-generated QR Code.rst b/source/ameba_d/amb21/Example_Guides/E-Paper/E-Paper - Display User-generated QR Code.rst index b964d40..63cf731 100644 --- a/source/ameba_d/amb21/Example_Guides/E-Paper/E-Paper - Display User-generated QR Code.rst +++ b/source/ameba_d/amb21/Example_Guides/E-Paper/E-Paper - Display User-generated QR Code.rst @@ -69,7 +69,6 @@ https://github.com/waveshare/e-Paper [3] Generate a QR code on the E-paper module: https://eugeniopace.org/qrcode/arduino/eink/2019/07/01/qrcode-on-arduino.html - .. |image01| image:: ../../../../_static/amebad/Example_Guides/E-Paper/Epaper_Display_user_generated_QR_code/image01.png :width: 823 px :height: 459 px diff --git a/source/ameba_d/amb21/Example_Guides/OTA/Ameba Over-the-Air Firmware Update via HTTP.rst b/source/ameba_d/amb21/Example_Guides/OTA/Ameba Over-the-Air Firmware Update via HTTP.rst deleted file mode 100644 index d8c04ea..0000000 --- a/source/ameba_d/amb21/Example_Guides/OTA/Ameba Over-the-Air Firmware Update via HTTP.rst +++ /dev/null @@ -1,201 +0,0 @@ -Ameba Over-the-Air Firmware Update via HTTP -=========================================== - -.. contents:: - :local: - :depth: 2 - -Materials ---------- - -- AmebaD [AMB21 / AMB22 / AMB23 / AMB26 / BW16] x 1 -- Set up of Web UI in a PC - -Example -------- - -Compile and Upload OTA Example -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -In this example, we use a web UI to upload firmware to one or more AmebaD boards. - -For the instructions to set up web UI for AmebaD OTA: Web UI, please click into the link below and perform the steps as shown in the ``README.md``. [https://github.com/Ameba-AioT/ameba-OTA-UI] - -If Ameba OTA Web UI is set up successfully in your PC, you will see the webpage on [http://localhost:3000/], figure below shows the rendering of webpage with no device connected: - -|image01| - -To begin, open the OTA example in Arduino IDE. “File” -> “Examples” -> “AmebaOTA” -> “OTA_Http”. - -|image02| - -Edit the port and server field according to your HTTP server. Usually, you will only need to change the server IP address to your PC's IP address. Do not change the port here unless you change the port in the Web UI too. -Please also modify the SSID and password according to your AP. - -|image03| - -Now, compile and upload this example into each and every board that you have. It can be one board or multiple boards (we will be using two AmebaD boards in this example guide). - -This set up must be done at least once to allow the OTA thread API to be called for the first time. For subsequent firmware updates, as long as ``OTA.h`` is included and ``start_ota_threads`` API is called in the setup function, you do not need to re-upload the code manually. - -Once uploaded, press reset button and get the IP address of the individual AmebaD board on serial monitor. - -**Board 1 IP address: 192.168.3.78** - -|image04| - -**Board 2 IP address: 192.168.3.88** - -|image05| - -Then, go to Ameba OTA Web UI [http://localhost:3000/] to view the connected device(s). - -|image06| - -If you can see the IP address(es) of your AmebaD board(s) on the OTA webpage, it shows that the connection is successful. - -For the steps below, you may disconnect AmebaD from your PC and power up the board with any stable 5V DC power source. The overall connection map of this example guide is shown in the figure below. - -|image07| - -In this tutorial, we will be uploading a NTPClient sketch via OTA. Open the NTPClient example. "File" -> "Examples" -> "NTPClient" -> "Basic". Include the header file ``OTA.h`` and at the end of setup function, add in the API ``start_OTA_threads();``. Also modify the SSID and password according to your AP. Your PC and AMB82 Mini should be connecting to the same local network. Refer to the picture below for the modified NTPClient sketch. - -|image08| - -Compile the modified NTPClient sketch, DO NOT upload after compilation. - -Priority matters: Kindly take note that AmebaD will only boot with the latest compiled firmware. - -Once compilation is done, follow the steps below to generate OTA image. - -Generate OTA Image -~~~~~~~~~~~~~~~~~~ - -|image09| - -1. Look for ``km0_km4_image2.bin file`` in C:\\Users\\\\AppData\\Local\\Arduino15\\packages\\realtek\\tools\\ameba_d_tools\\x.x.x. This file will be used as the source binary to be converted to an OTA binary later. - -2. Download the ``ImageTool.exe`` from GitHub: https://github.com/Ameba-AIoT/ameba-rtos-d/tree/main/tools/AmebaD/Image_Tool, double click to open it. - -3. Select "OTA_All" as Generate Target type (in red box). - -4. Input Image Version, the default value is "0xFFFFFFFF". - -5. Click Browse button to select target images to be converted to an OTA binary. The address can be ignored. The Memory Layout bar will show the relative positions of the two images. If they overlap, the overlapped area is in red colour for warning. - -6. Click Generate button to specify the name and path of the output file. After the operation is done, the OTA image ``OTA_All.bin`` is generated at your specified folder. - -.. note :: We recommend placing it in the default tools folder for Arduino Ameba. When navigating to the designated tools folder on your target operating system, create a new folder called "misc" and put the OTA image ``OTA_All.bin`` within it. - - * *a. Windows* - C:\\Users\\username\\AppData\\Local\\Arduino15\\packages\\realtek\\tools\\ameba_d_tools\\x.x.x\\misc - * *b. Linux* - /home/username/.arduino15/packages/Realtek/tools/ameba_d_tools/x.x.x/misc - * *c. MacOS* - /Users/username/Library/Arduino15/packages/Realtek/tools/ameba_d_tools/x.x.x/misc - -Upload and Transfer OTA Image -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Upload ``OTA_All.bin`` (or renamed ``OTA_All.bin``) to the webpage UI for OTA transfer to AmebaD, as shown in the figure below: - -|image10| - -Once uploaded, select the device(s) to perform OTA transfer: - -|image11| - -Click Start OTA to begin OTA transfer. You will see the change of OTA state while the firmware is being updated on the board(s), as shown in the figure below. - -|image12| - -The board will automatically reboot with the OTA transferred firmware (i.e. modified NTPClient in this example) once download progress is completed. - -You will see the output generated on serial monitor after reboot. - -Board 1: - -|image13| - -Board 2: - -|image14| - -.. |image01| image:: ../../../../_static/amebad/Example_Guides/OTA/OTA_Http/image01.png - :width: 602 px - :height: 348 px -.. |image02| image:: ../../../../_static/amebad/Example_Guides/OTA/OTA_Http/image02.png - :width: 733 px - :height: 798 px -.. |image03| image:: ../../../../_static/amebad/Example_Guides/OTA/OTA_Http/image03.png - :width: 588 px - :height: 679 px -.. |image04| image:: ../../../../_static/amebad/Example_Guides/OTA/OTA_Http/image04.png - :width: 869 px - :height: 467 px -.. |image05| image:: ../../../../_static/amebad/Example_Guides/OTA/OTA_Http/image05.png - :width: 847 px - :height: 444 px -.. |image06| image:: ../../../../_static/amebad/Example_Guides/OTA/OTA_Http/image06.png - :width: 1280 px - :height: 720 px - :scale: 50% -.. |image07| image:: ../../../../_static/amebad/Example_Guides/OTA/OTA_Http/image07.png - :width: 1168 px - :height: 294 px - :scale: 70% -.. |image08| image:: ../../../../_static/amebad/Example_Guides/OTA/OTA_Http/image08.png - :width: 593 px - :height: 831 px -.. |image09| image:: ../../../../_static/amebad/Example_Guides/OTA/OTA_Http/image09.png - :width: 529 px - :height: 716 px -.. |image10| image:: ../../../../_static/amebad/Example_Guides/OTA/OTA_Http/image10.png - :width: 516 px - :height: 521 px -.. |image11| image:: ../../../../_static/amebad/Example_Guides/OTA/OTA_Http/image11.png - :width: 1280 px - :height: 720 px - :scale: 50% -.. |image12| image:: ../../../../_static/amebad/Example_Guides/OTA/OTA_Http/image12.png - :width: 755 px - :height: 278 px -.. |image13| image:: ../../../../_static/amebad/Example_Guides/OTA/OTA_Http/image13.png - :width: 552 px - :height: 327 px -.. |image14| image:: ../../../../_static/amebad/Example_Guides/OTA/OTA_Http/image14.png - :width: 559 px - :height: 325 px - -Code Reference --------------- - -**Multithreading:** - -Two threads are written in ``start_OTA_threads()`` to ensure successful OTA update. - -Thread 1: For the purpose of connectivity check, the OTA state is sent to the server from AMB82 Mini board. Once received, the OTA state of the board will be shown on the Web UI. - -.. code-block:: c++ - - thread1_id = os_thread_create_arduino(thread1_task, NULL, priority1, stack_size1); - - // First thread is to do keep alive connectivity check (post requests every 5s) - if (thread1_id) { - Serial.println("[OTA] Keep-alive connectivity thread created success-fully."); - } else { - Serial.println("[OTA] Failed to create keep-alive connectivity thread."); - } - -Thread 2: To listen for the OTA begin signal from server, once ``start_ota`` signal is received, AMB82 Mini will request for the firmware to be downloaded via OTA. - -.. code-block:: c++ - - thread2_id = os_thread_create_arduino(thread2_task, NULL, priority1, stack_size2); - - // Second thread is to get the signal to start OTA process. - if (thread2_id) { - Serial.println("[OTA] Start OTA process thread created successfully."); - } else { - Serial.println("[OTA] Failed to create Start OTA process thread."); - } \ No newline at end of file diff --git a/source/ameba_d/amb21/Example_Guides/OTA/index.rst b/source/ameba_d/amb21/Example_Guides/OTA/index.rst deleted file mode 100644 index 9585e41..0000000 --- a/source/ameba_d/amb21/Example_Guides/OTA/index.rst +++ /dev/null @@ -1,7 +0,0 @@ -OTA -=== - -.. toctree:: - :maxdepth: 1 - - Ameba Over-the-Air Firmware Update via HTTP diff --git a/source/ameba_d/amb21/Example_Guides/TensorFlow Lite/TensorFlow Lite - Person Detection.rst b/source/ameba_d/amb21/Example_Guides/TensorFlow Lite/TensorFlow Lite - Person Detection.rst index e810122..d9ec5e2 100644 --- a/source/ameba_d/amb21/Example_Guides/TensorFlow Lite/TensorFlow Lite - Person Detection.rst +++ b/source/ameba_d/amb21/Example_Guides/TensorFlow Lite/TensorFlow Lite - Person Detection.rst @@ -23,7 +23,6 @@ Connect the camera and LEDs to the Ameba board according to the diagram below. |image01| - 1. Download the Ameba customized version of TensorFlow Lite for Microcontrollers library at https://github.com/Ameba-AIoT/ameba-arduino-d/blob/master/Arduino_zip_libraries/Ameba_TensorFlowLite.zip. Follow the instructions at https://docs.arduino.cc/software/ide-v1/tutorials/installing-libraries to install it. 2. Download Ameba_ArduCAM library at https://github.com/Ameba-AIoT/ameba-arduino-d/blob/master/Arduino_zip_libraries/Ameba_ArduCAM.zip. Follow the instructions at https://docs.arduino.cc/software/ide-v1/tutorials/installing-libraries to install it. diff --git a/source/ameba_d/amb21/Example_Guides/USB/USB - CDC Serial Port.rst b/source/ameba_d/amb21/Example_Guides/USB/USB - CDC Serial Port.rst index d86098a..3cd89a4 100644 --- a/source/ameba_d/amb21/Example_Guides/USB/USB - CDC Serial Port.rst +++ b/source/ameba_d/amb21/Example_Guides/USB/USB - CDC Serial Port.rst @@ -23,7 +23,6 @@ In this example, the RTL8722 board emulates a CDC ACM virtual COM-port connected Two USB ports will be used simultaneously, thus two USB cables are required for this example. In addition to the regular USB port used for uploading code, the second USB cable should be connected to the USB OTG port as shown below. - For AMB21 / AMB22, a modification needs to be made to enable the USB OTG port. The two zero-ohm resistors in the red box should be resoldered and moved into the green position. This will disable pins 16 and 17 (GPIOA_25 and GPIOA_26) on the pin headers and enable the middle USB port. |image02| diff --git a/source/ameba_d/amb21/Example_Guides/USB/USB - HID Keyboard.rst b/source/ameba_d/amb21/Example_Guides/USB/USB - HID Keyboard.rst index 3c3922c..c24363d 100644 --- a/source/ameba_d/amb21/Example_Guides/USB/USB - HID Keyboard.rst +++ b/source/ameba_d/amb21/Example_Guides/USB/USB - HID Keyboard.rst @@ -12,7 +12,6 @@ Materials - USB host device [ Windows / Linux / MacOS ] - Example -------- diff --git a/source/ameba_d/amb21/Example_Guides/index.rst b/source/ameba_d/amb21/Example_Guides/index.rst index 71bd054..4182c55 100644 --- a/source/ameba_d/amb21/Example_Guides/index.rst +++ b/source/ameba_d/amb21/Example_Guides/index.rst @@ -8,7 +8,6 @@ Example Guides AudioCodec/index Basic/index BLE/index - Debugging/index E-Paper/index Flash Memory/index GPIO/index diff --git a/source/ameba_d/amb23/Example_Guides/E-Paper/E-Paper - Display User-generated QR Code.rst b/source/ameba_d/amb23/Example_Guides/E-Paper/E-Paper - Display User-generated QR Code.rst index 09d6794..608b2b8 100644 --- a/source/ameba_d/amb23/Example_Guides/E-Paper/E-Paper - Display User-generated QR Code.rst +++ b/source/ameba_d/amb23/Example_Guides/E-Paper/E-Paper - Display User-generated QR Code.rst @@ -69,7 +69,6 @@ https://github.com/waveshare/e-Paper [3] Generate a QR code on the E-paper module: https://eugeniopace.org/qrcode/arduino/eink/2019/07/01/qrcode-on-arduino.html - .. |image02| image:: ../../../../_static/amebad/Example_Guides/E-Paper/Epaper_Display_user_generated_QR_code/image02.png :width: 816 px :height: 349 px diff --git a/source/ameba_d/amb23/Example_Guides/OTA/Ameba Over-the-Air Firmware Update via HTTP.rst b/source/ameba_d/amb23/Example_Guides/OTA/Ameba Over-the-Air Firmware Update via HTTP.rst deleted file mode 100644 index d8c04ea..0000000 --- a/source/ameba_d/amb23/Example_Guides/OTA/Ameba Over-the-Air Firmware Update via HTTP.rst +++ /dev/null @@ -1,201 +0,0 @@ -Ameba Over-the-Air Firmware Update via HTTP -=========================================== - -.. contents:: - :local: - :depth: 2 - -Materials ---------- - -- AmebaD [AMB21 / AMB22 / AMB23 / AMB26 / BW16] x 1 -- Set up of Web UI in a PC - -Example -------- - -Compile and Upload OTA Example -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -In this example, we use a web UI to upload firmware to one or more AmebaD boards. - -For the instructions to set up web UI for AmebaD OTA: Web UI, please click into the link below and perform the steps as shown in the ``README.md``. [https://github.com/Ameba-AioT/ameba-OTA-UI] - -If Ameba OTA Web UI is set up successfully in your PC, you will see the webpage on [http://localhost:3000/], figure below shows the rendering of webpage with no device connected: - -|image01| - -To begin, open the OTA example in Arduino IDE. “File” -> “Examples” -> “AmebaOTA” -> “OTA_Http”. - -|image02| - -Edit the port and server field according to your HTTP server. Usually, you will only need to change the server IP address to your PC's IP address. Do not change the port here unless you change the port in the Web UI too. -Please also modify the SSID and password according to your AP. - -|image03| - -Now, compile and upload this example into each and every board that you have. It can be one board or multiple boards (we will be using two AmebaD boards in this example guide). - -This set up must be done at least once to allow the OTA thread API to be called for the first time. For subsequent firmware updates, as long as ``OTA.h`` is included and ``start_ota_threads`` API is called in the setup function, you do not need to re-upload the code manually. - -Once uploaded, press reset button and get the IP address of the individual AmebaD board on serial monitor. - -**Board 1 IP address: 192.168.3.78** - -|image04| - -**Board 2 IP address: 192.168.3.88** - -|image05| - -Then, go to Ameba OTA Web UI [http://localhost:3000/] to view the connected device(s). - -|image06| - -If you can see the IP address(es) of your AmebaD board(s) on the OTA webpage, it shows that the connection is successful. - -For the steps below, you may disconnect AmebaD from your PC and power up the board with any stable 5V DC power source. The overall connection map of this example guide is shown in the figure below. - -|image07| - -In this tutorial, we will be uploading a NTPClient sketch via OTA. Open the NTPClient example. "File" -> "Examples" -> "NTPClient" -> "Basic". Include the header file ``OTA.h`` and at the end of setup function, add in the API ``start_OTA_threads();``. Also modify the SSID and password according to your AP. Your PC and AMB82 Mini should be connecting to the same local network. Refer to the picture below for the modified NTPClient sketch. - -|image08| - -Compile the modified NTPClient sketch, DO NOT upload after compilation. - -Priority matters: Kindly take note that AmebaD will only boot with the latest compiled firmware. - -Once compilation is done, follow the steps below to generate OTA image. - -Generate OTA Image -~~~~~~~~~~~~~~~~~~ - -|image09| - -1. Look for ``km0_km4_image2.bin file`` in C:\\Users\\\\AppData\\Local\\Arduino15\\packages\\realtek\\tools\\ameba_d_tools\\x.x.x. This file will be used as the source binary to be converted to an OTA binary later. - -2. Download the ``ImageTool.exe`` from GitHub: https://github.com/Ameba-AIoT/ameba-rtos-d/tree/main/tools/AmebaD/Image_Tool, double click to open it. - -3. Select "OTA_All" as Generate Target type (in red box). - -4. Input Image Version, the default value is "0xFFFFFFFF". - -5. Click Browse button to select target images to be converted to an OTA binary. The address can be ignored. The Memory Layout bar will show the relative positions of the two images. If they overlap, the overlapped area is in red colour for warning. - -6. Click Generate button to specify the name and path of the output file. After the operation is done, the OTA image ``OTA_All.bin`` is generated at your specified folder. - -.. note :: We recommend placing it in the default tools folder for Arduino Ameba. When navigating to the designated tools folder on your target operating system, create a new folder called "misc" and put the OTA image ``OTA_All.bin`` within it. - - * *a. Windows* - C:\\Users\\username\\AppData\\Local\\Arduino15\\packages\\realtek\\tools\\ameba_d_tools\\x.x.x\\misc - * *b. Linux* - /home/username/.arduino15/packages/Realtek/tools/ameba_d_tools/x.x.x/misc - * *c. MacOS* - /Users/username/Library/Arduino15/packages/Realtek/tools/ameba_d_tools/x.x.x/misc - -Upload and Transfer OTA Image -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Upload ``OTA_All.bin`` (or renamed ``OTA_All.bin``) to the webpage UI for OTA transfer to AmebaD, as shown in the figure below: - -|image10| - -Once uploaded, select the device(s) to perform OTA transfer: - -|image11| - -Click Start OTA to begin OTA transfer. You will see the change of OTA state while the firmware is being updated on the board(s), as shown in the figure below. - -|image12| - -The board will automatically reboot with the OTA transferred firmware (i.e. modified NTPClient in this example) once download progress is completed. - -You will see the output generated on serial monitor after reboot. - -Board 1: - -|image13| - -Board 2: - -|image14| - -.. |image01| image:: ../../../../_static/amebad/Example_Guides/OTA/OTA_Http/image01.png - :width: 602 px - :height: 348 px -.. |image02| image:: ../../../../_static/amebad/Example_Guides/OTA/OTA_Http/image02.png - :width: 733 px - :height: 798 px -.. |image03| image:: ../../../../_static/amebad/Example_Guides/OTA/OTA_Http/image03.png - :width: 588 px - :height: 679 px -.. |image04| image:: ../../../../_static/amebad/Example_Guides/OTA/OTA_Http/image04.png - :width: 869 px - :height: 467 px -.. |image05| image:: ../../../../_static/amebad/Example_Guides/OTA/OTA_Http/image05.png - :width: 847 px - :height: 444 px -.. |image06| image:: ../../../../_static/amebad/Example_Guides/OTA/OTA_Http/image06.png - :width: 1280 px - :height: 720 px - :scale: 50% -.. |image07| image:: ../../../../_static/amebad/Example_Guides/OTA/OTA_Http/image07.png - :width: 1168 px - :height: 294 px - :scale: 70% -.. |image08| image:: ../../../../_static/amebad/Example_Guides/OTA/OTA_Http/image08.png - :width: 593 px - :height: 831 px -.. |image09| image:: ../../../../_static/amebad/Example_Guides/OTA/OTA_Http/image09.png - :width: 529 px - :height: 716 px -.. |image10| image:: ../../../../_static/amebad/Example_Guides/OTA/OTA_Http/image10.png - :width: 516 px - :height: 521 px -.. |image11| image:: ../../../../_static/amebad/Example_Guides/OTA/OTA_Http/image11.png - :width: 1280 px - :height: 720 px - :scale: 50% -.. |image12| image:: ../../../../_static/amebad/Example_Guides/OTA/OTA_Http/image12.png - :width: 755 px - :height: 278 px -.. |image13| image:: ../../../../_static/amebad/Example_Guides/OTA/OTA_Http/image13.png - :width: 552 px - :height: 327 px -.. |image14| image:: ../../../../_static/amebad/Example_Guides/OTA/OTA_Http/image14.png - :width: 559 px - :height: 325 px - -Code Reference --------------- - -**Multithreading:** - -Two threads are written in ``start_OTA_threads()`` to ensure successful OTA update. - -Thread 1: For the purpose of connectivity check, the OTA state is sent to the server from AMB82 Mini board. Once received, the OTA state of the board will be shown on the Web UI. - -.. code-block:: c++ - - thread1_id = os_thread_create_arduino(thread1_task, NULL, priority1, stack_size1); - - // First thread is to do keep alive connectivity check (post requests every 5s) - if (thread1_id) { - Serial.println("[OTA] Keep-alive connectivity thread created success-fully."); - } else { - Serial.println("[OTA] Failed to create keep-alive connectivity thread."); - } - -Thread 2: To listen for the OTA begin signal from server, once ``start_ota`` signal is received, AMB82 Mini will request for the firmware to be downloaded via OTA. - -.. code-block:: c++ - - thread2_id = os_thread_create_arduino(thread2_task, NULL, priority1, stack_size2); - - // Second thread is to get the signal to start OTA process. - if (thread2_id) { - Serial.println("[OTA] Start OTA process thread created successfully."); - } else { - Serial.println("[OTA] Failed to create Start OTA process thread."); - } \ No newline at end of file diff --git a/source/ameba_d/amb23/Example_Guides/OTA/index.rst b/source/ameba_d/amb23/Example_Guides/OTA/index.rst deleted file mode 100644 index 9585e41..0000000 --- a/source/ameba_d/amb23/Example_Guides/OTA/index.rst +++ /dev/null @@ -1,7 +0,0 @@ -OTA -=== - -.. toctree:: - :maxdepth: 1 - - Ameba Over-the-Air Firmware Update via HTTP diff --git a/source/ameba_d/amb23/Example_Guides/TensorFlow Lite/TensorFlow Lite - Person Detection.rst b/source/ameba_d/amb23/Example_Guides/TensorFlow Lite/TensorFlow Lite - Person Detection.rst index 9681030..6f9f0b7 100644 --- a/source/ameba_d/amb23/Example_Guides/TensorFlow Lite/TensorFlow Lite - Person Detection.rst +++ b/source/ameba_d/amb23/Example_Guides/TensorFlow Lite/TensorFlow Lite - Person Detection.rst @@ -23,7 +23,6 @@ Connect the camera and LEDs to the Ameba board according to the diagram below. |image02| - 1. Download the Ameba customized version of TensorFlow Lite for Microcontrollers library at https://github.com/Ameba-AIoT/ameba-arduino-d/blob/master/Arduino_zip_libraries/Ameba_TensorFlowLite.zip. Follow the instructions at https://docs.arduino.cc/software/ide-v1/tutorials/installing-libraries to install it. 2. Download Ameba_ArduCAM library at https://github.com/Ameba-AIoT/ameba-arduino-d/blob/master/Arduino_zip_libraries/Ameba_ArduCAM.zip. Follow the instructions at https://docs.arduino.cc/software/ide-v1/tutorials/installing-libraries to install it. diff --git a/source/ameba_d/amb23/Example_Guides/USB/USB - HID Keyboard.rst b/source/ameba_d/amb23/Example_Guides/USB/USB - HID Keyboard.rst index 76dd4a5..49f60a6 100644 --- a/source/ameba_d/amb23/Example_Guides/USB/USB - HID Keyboard.rst +++ b/source/ameba_d/amb23/Example_Guides/USB/USB - HID Keyboard.rst @@ -12,7 +12,6 @@ Materials - USB host device [ Windows / Linux / MacOS ] - Example -------- diff --git a/source/ameba_d/amb23/Example_Guides/index.rst b/source/ameba_d/amb23/Example_Guides/index.rst index 1ab3a8e..c624eac 100644 --- a/source/ameba_d/amb23/Example_Guides/index.rst +++ b/source/ameba_d/amb23/Example_Guides/index.rst @@ -7,7 +7,6 @@ Example Guides AudioCodec/index Basic/index BLE/index - Debugging/index E-Paper/index FatfsSDIO/index Flash Memory/index diff --git a/source/ameba_d/amb25/Example_Guides/E-Paper/E-Paper - Display User-generated QR Code.rst b/source/ameba_d/amb25/Example_Guides/E-Paper/E-Paper - Display User-generated QR Code.rst index fd9a64b..9dd3af0 100644 --- a/source/ameba_d/amb25/Example_Guides/E-Paper/E-Paper - Display User-generated QR Code.rst +++ b/source/ameba_d/amb25/Example_Guides/E-Paper/E-Paper - Display User-generated QR Code.rst @@ -69,7 +69,6 @@ https://github.com/waveshare/e-Paper [3] Generate a QR code on the E-paper module: https://eugeniopace.org/qrcode/arduino/eink/2019/07/01/qrcode-on-arduino.html - .. |image06| image:: ../../../../_static/amebad/Example_Guides/E-Paper/Epaper_Display_user_generated_QR_code/image06.png :width: 833 px :height: 421 px diff --git a/source/ameba_d/amb25/Example_Guides/OTA/index.rst b/source/ameba_d/amb25/Example_Guides/OTA/index.rst deleted file mode 100644 index 9585e41..0000000 --- a/source/ameba_d/amb25/Example_Guides/OTA/index.rst +++ /dev/null @@ -1,7 +0,0 @@ -OTA -=== - -.. toctree:: - :maxdepth: 1 - - Ameba Over-the-Air Firmware Update via HTTP diff --git a/source/ameba_d/amb25/Example_Guides/index.rst b/source/ameba_d/amb25/Example_Guides/index.rst index f1bb727..ec9ec96 100644 --- a/source/ameba_d/amb25/Example_Guides/index.rst +++ b/source/ameba_d/amb25/Example_Guides/index.rst @@ -6,7 +6,6 @@ Example Guides Basic/index BLE/index - Debugging/index E-Paper/index Flash Memory/index GPIO/index diff --git a/source/ameba_d/amb26/Example_Guides/E-Paper/E-Paper - Display User-generated QR Code.rst b/source/ameba_d/amb26/Example_Guides/E-Paper/E-Paper - Display User-generated QR Code.rst index 112c1b7..d67f4d5 100644 --- a/source/ameba_d/amb26/Example_Guides/E-Paper/E-Paper - Display User-generated QR Code.rst +++ b/source/ameba_d/amb26/Example_Guides/E-Paper/E-Paper - Display User-generated QR Code.rst @@ -69,7 +69,6 @@ https://github.com/waveshare/e-Paper [3] Generate a QR code on the E-paper module: https://eugeniopace.org/qrcode/arduino/eink/2019/07/01/qrcode-on-arduino.html - .. |image07| image:: ../../../../_static/amebad/Example_Guides/E-Paper/Epaper_Display_user_generated_QR_code/image07.png :width: 844 px :height: 432 px diff --git a/source/ameba_d/amb26/Example_Guides/OTA/Ameba Over-the-Air Firmware Update via HTTP.rst b/source/ameba_d/amb26/Example_Guides/OTA/Ameba Over-the-Air Firmware Update via HTTP.rst deleted file mode 100644 index d8c04ea..0000000 --- a/source/ameba_d/amb26/Example_Guides/OTA/Ameba Over-the-Air Firmware Update via HTTP.rst +++ /dev/null @@ -1,201 +0,0 @@ -Ameba Over-the-Air Firmware Update via HTTP -=========================================== - -.. contents:: - :local: - :depth: 2 - -Materials ---------- - -- AmebaD [AMB21 / AMB22 / AMB23 / AMB26 / BW16] x 1 -- Set up of Web UI in a PC - -Example -------- - -Compile and Upload OTA Example -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -In this example, we use a web UI to upload firmware to one or more AmebaD boards. - -For the instructions to set up web UI for AmebaD OTA: Web UI, please click into the link below and perform the steps as shown in the ``README.md``. [https://github.com/Ameba-AioT/ameba-OTA-UI] - -If Ameba OTA Web UI is set up successfully in your PC, you will see the webpage on [http://localhost:3000/], figure below shows the rendering of webpage with no device connected: - -|image01| - -To begin, open the OTA example in Arduino IDE. “File” -> “Examples” -> “AmebaOTA” -> “OTA_Http”. - -|image02| - -Edit the port and server field according to your HTTP server. Usually, you will only need to change the server IP address to your PC's IP address. Do not change the port here unless you change the port in the Web UI too. -Please also modify the SSID and password according to your AP. - -|image03| - -Now, compile and upload this example into each and every board that you have. It can be one board or multiple boards (we will be using two AmebaD boards in this example guide). - -This set up must be done at least once to allow the OTA thread API to be called for the first time. For subsequent firmware updates, as long as ``OTA.h`` is included and ``start_ota_threads`` API is called in the setup function, you do not need to re-upload the code manually. - -Once uploaded, press reset button and get the IP address of the individual AmebaD board on serial monitor. - -**Board 1 IP address: 192.168.3.78** - -|image04| - -**Board 2 IP address: 192.168.3.88** - -|image05| - -Then, go to Ameba OTA Web UI [http://localhost:3000/] to view the connected device(s). - -|image06| - -If you can see the IP address(es) of your AmebaD board(s) on the OTA webpage, it shows that the connection is successful. - -For the steps below, you may disconnect AmebaD from your PC and power up the board with any stable 5V DC power source. The overall connection map of this example guide is shown in the figure below. - -|image07| - -In this tutorial, we will be uploading a NTPClient sketch via OTA. Open the NTPClient example. "File" -> "Examples" -> "NTPClient" -> "Basic". Include the header file ``OTA.h`` and at the end of setup function, add in the API ``start_OTA_threads();``. Also modify the SSID and password according to your AP. Your PC and AMB82 Mini should be connecting to the same local network. Refer to the picture below for the modified NTPClient sketch. - -|image08| - -Compile the modified NTPClient sketch, DO NOT upload after compilation. - -Priority matters: Kindly take note that AmebaD will only boot with the latest compiled firmware. - -Once compilation is done, follow the steps below to generate OTA image. - -Generate OTA Image -~~~~~~~~~~~~~~~~~~ - -|image09| - -1. Look for ``km0_km4_image2.bin file`` in C:\\Users\\\\AppData\\Local\\Arduino15\\packages\\realtek\\tools\\ameba_d_tools\\x.x.x. This file will be used as the source binary to be converted to an OTA binary later. - -2. Download the ``ImageTool.exe`` from GitHub: https://github.com/Ameba-AIoT/ameba-rtos-d/tree/main/tools/AmebaD/Image_Tool, double click to open it. - -3. Select "OTA_All" as Generate Target type (in red box). - -4. Input Image Version, the default value is "0xFFFFFFFF". - -5. Click Browse button to select target images to be converted to an OTA binary. The address can be ignored. The Memory Layout bar will show the relative positions of the two images. If they overlap, the overlapped area is in red colour for warning. - -6. Click Generate button to specify the name and path of the output file. After the operation is done, the OTA image ``OTA_All.bin`` is generated at your specified folder. - -.. note :: We recommend placing it in the default tools folder for Arduino Ameba. When navigating to the designated tools folder on your target operating system, create a new folder called "misc" and put the OTA image ``OTA_All.bin`` within it. - - * *a. Windows* - C:\\Users\\username\\AppData\\Local\\Arduino15\\packages\\realtek\\tools\\ameba_d_tools\\x.x.x\\misc - * *b. Linux* - /home/username/.arduino15/packages/Realtek/tools/ameba_d_tools/x.x.x/misc - * *c. MacOS* - /Users/username/Library/Arduino15/packages/Realtek/tools/ameba_d_tools/x.x.x/misc - -Upload and Transfer OTA Image -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Upload ``OTA_All.bin`` (or renamed ``OTA_All.bin``) to the webpage UI for OTA transfer to AmebaD, as shown in the figure below: - -|image10| - -Once uploaded, select the device(s) to perform OTA transfer: - -|image11| - -Click Start OTA to begin OTA transfer. You will see the change of OTA state while the firmware is being updated on the board(s), as shown in the figure below. - -|image12| - -The board will automatically reboot with the OTA transferred firmware (i.e. modified NTPClient in this example) once download progress is completed. - -You will see the output generated on serial monitor after reboot. - -Board 1: - -|image13| - -Board 2: - -|image14| - -.. |image01| image:: ../../../../_static/amebad/Example_Guides/OTA/OTA_Http/image01.png - :width: 602 px - :height: 348 px -.. |image02| image:: ../../../../_static/amebad/Example_Guides/OTA/OTA_Http/image02.png - :width: 733 px - :height: 798 px -.. |image03| image:: ../../../../_static/amebad/Example_Guides/OTA/OTA_Http/image03.png - :width: 588 px - :height: 679 px -.. |image04| image:: ../../../../_static/amebad/Example_Guides/OTA/OTA_Http/image04.png - :width: 869 px - :height: 467 px -.. |image05| image:: ../../../../_static/amebad/Example_Guides/OTA/OTA_Http/image05.png - :width: 847 px - :height: 444 px -.. |image06| image:: ../../../../_static/amebad/Example_Guides/OTA/OTA_Http/image06.png - :width: 1280 px - :height: 720 px - :scale: 50% -.. |image07| image:: ../../../../_static/amebad/Example_Guides/OTA/OTA_Http/image07.png - :width: 1168 px - :height: 294 px - :scale: 70% -.. |image08| image:: ../../../../_static/amebad/Example_Guides/OTA/OTA_Http/image08.png - :width: 593 px - :height: 831 px -.. |image09| image:: ../../../../_static/amebad/Example_Guides/OTA/OTA_Http/image09.png - :width: 529 px - :height: 716 px -.. |image10| image:: ../../../../_static/amebad/Example_Guides/OTA/OTA_Http/image10.png - :width: 516 px - :height: 521 px -.. |image11| image:: ../../../../_static/amebad/Example_Guides/OTA/OTA_Http/image11.png - :width: 1280 px - :height: 720 px - :scale: 50% -.. |image12| image:: ../../../../_static/amebad/Example_Guides/OTA/OTA_Http/image12.png - :width: 755 px - :height: 278 px -.. |image13| image:: ../../../../_static/amebad/Example_Guides/OTA/OTA_Http/image13.png - :width: 552 px - :height: 327 px -.. |image14| image:: ../../../../_static/amebad/Example_Guides/OTA/OTA_Http/image14.png - :width: 559 px - :height: 325 px - -Code Reference --------------- - -**Multithreading:** - -Two threads are written in ``start_OTA_threads()`` to ensure successful OTA update. - -Thread 1: For the purpose of connectivity check, the OTA state is sent to the server from AMB82 Mini board. Once received, the OTA state of the board will be shown on the Web UI. - -.. code-block:: c++ - - thread1_id = os_thread_create_arduino(thread1_task, NULL, priority1, stack_size1); - - // First thread is to do keep alive connectivity check (post requests every 5s) - if (thread1_id) { - Serial.println("[OTA] Keep-alive connectivity thread created success-fully."); - } else { - Serial.println("[OTA] Failed to create keep-alive connectivity thread."); - } - -Thread 2: To listen for the OTA begin signal from server, once ``start_ota`` signal is received, AMB82 Mini will request for the firmware to be downloaded via OTA. - -.. code-block:: c++ - - thread2_id = os_thread_create_arduino(thread2_task, NULL, priority1, stack_size2); - - // Second thread is to get the signal to start OTA process. - if (thread2_id) { - Serial.println("[OTA] Start OTA process thread created successfully."); - } else { - Serial.println("[OTA] Failed to create Start OTA process thread."); - } \ No newline at end of file diff --git a/source/ameba_d/amb26/Example_Guides/OTA/index.rst b/source/ameba_d/amb26/Example_Guides/OTA/index.rst deleted file mode 100644 index 9585e41..0000000 --- a/source/ameba_d/amb26/Example_Guides/OTA/index.rst +++ /dev/null @@ -1,7 +0,0 @@ -OTA -=== - -.. toctree:: - :maxdepth: 1 - - Ameba Over-the-Air Firmware Update via HTTP diff --git a/source/ameba_d/amb26/Example_Guides/index.rst b/source/ameba_d/amb26/Example_Guides/index.rst index f1bb727..ec9ec96 100644 --- a/source/ameba_d/amb26/Example_Guides/index.rst +++ b/source/ameba_d/amb26/Example_Guides/index.rst @@ -6,7 +6,6 @@ Example Guides Basic/index BLE/index - Debugging/index E-Paper/index Flash Memory/index GPIO/index diff --git a/source/ameba_d/aw-cu488/Example_Guides/E-Paper/E-Paper - Display User-generated QR Code.rst b/source/ameba_d/aw-cu488/Example_Guides/E-Paper/E-Paper - Display User-generated QR Code.rst index 3f46fff..0d3d15f 100644 --- a/source/ameba_d/aw-cu488/Example_Guides/E-Paper/E-Paper - Display User-generated QR Code.rst +++ b/source/ameba_d/aw-cu488/Example_Guides/E-Paper/E-Paper - Display User-generated QR Code.rst @@ -69,7 +69,6 @@ https://github.com/waveshare/e-Paper [3] Generate a QR code on the E-paper module: https://eugeniopace.org/qrcode/arduino/eink/2019/07/01/qrcode-on-arduino.html - .. |image05| image:: ../../../../_static/amebad/Example_Guides/E-Paper/Epaper_Display_user_generated_QR_code/image05.png :width: 893 px :height: 738 px diff --git a/source/ameba_d/aw-cu488/Example_Guides/OTA/Ameba Over-the-Air Firmware Update via HTTP.rst b/source/ameba_d/aw-cu488/Example_Guides/OTA/Ameba Over-the-Air Firmware Update via HTTP.rst deleted file mode 100644 index d8c04ea..0000000 --- a/source/ameba_d/aw-cu488/Example_Guides/OTA/Ameba Over-the-Air Firmware Update via HTTP.rst +++ /dev/null @@ -1,201 +0,0 @@ -Ameba Over-the-Air Firmware Update via HTTP -=========================================== - -.. contents:: - :local: - :depth: 2 - -Materials ---------- - -- AmebaD [AMB21 / AMB22 / AMB23 / AMB26 / BW16] x 1 -- Set up of Web UI in a PC - -Example -------- - -Compile and Upload OTA Example -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -In this example, we use a web UI to upload firmware to one or more AmebaD boards. - -For the instructions to set up web UI for AmebaD OTA: Web UI, please click into the link below and perform the steps as shown in the ``README.md``. [https://github.com/Ameba-AioT/ameba-OTA-UI] - -If Ameba OTA Web UI is set up successfully in your PC, you will see the webpage on [http://localhost:3000/], figure below shows the rendering of webpage with no device connected: - -|image01| - -To begin, open the OTA example in Arduino IDE. “File” -> “Examples” -> “AmebaOTA” -> “OTA_Http”. - -|image02| - -Edit the port and server field according to your HTTP server. Usually, you will only need to change the server IP address to your PC's IP address. Do not change the port here unless you change the port in the Web UI too. -Please also modify the SSID and password according to your AP. - -|image03| - -Now, compile and upload this example into each and every board that you have. It can be one board or multiple boards (we will be using two AmebaD boards in this example guide). - -This set up must be done at least once to allow the OTA thread API to be called for the first time. For subsequent firmware updates, as long as ``OTA.h`` is included and ``start_ota_threads`` API is called in the setup function, you do not need to re-upload the code manually. - -Once uploaded, press reset button and get the IP address of the individual AmebaD board on serial monitor. - -**Board 1 IP address: 192.168.3.78** - -|image04| - -**Board 2 IP address: 192.168.3.88** - -|image05| - -Then, go to Ameba OTA Web UI [http://localhost:3000/] to view the connected device(s). - -|image06| - -If you can see the IP address(es) of your AmebaD board(s) on the OTA webpage, it shows that the connection is successful. - -For the steps below, you may disconnect AmebaD from your PC and power up the board with any stable 5V DC power source. The overall connection map of this example guide is shown in the figure below. - -|image07| - -In this tutorial, we will be uploading a NTPClient sketch via OTA. Open the NTPClient example. "File" -> "Examples" -> "NTPClient" -> "Basic". Include the header file ``OTA.h`` and at the end of setup function, add in the API ``start_OTA_threads();``. Also modify the SSID and password according to your AP. Your PC and AMB82 Mini should be connecting to the same local network. Refer to the picture below for the modified NTPClient sketch. - -|image08| - -Compile the modified NTPClient sketch, DO NOT upload after compilation. - -Priority matters: Kindly take note that AmebaD will only boot with the latest compiled firmware. - -Once compilation is done, follow the steps below to generate OTA image. - -Generate OTA Image -~~~~~~~~~~~~~~~~~~ - -|image09| - -1. Look for ``km0_km4_image2.bin file`` in C:\\Users\\\\AppData\\Local\\Arduino15\\packages\\realtek\\tools\\ameba_d_tools\\x.x.x. This file will be used as the source binary to be converted to an OTA binary later. - -2. Download the ``ImageTool.exe`` from GitHub: https://github.com/Ameba-AIoT/ameba-rtos-d/tree/main/tools/AmebaD/Image_Tool, double click to open it. - -3. Select "OTA_All" as Generate Target type (in red box). - -4. Input Image Version, the default value is "0xFFFFFFFF". - -5. Click Browse button to select target images to be converted to an OTA binary. The address can be ignored. The Memory Layout bar will show the relative positions of the two images. If they overlap, the overlapped area is in red colour for warning. - -6. Click Generate button to specify the name and path of the output file. After the operation is done, the OTA image ``OTA_All.bin`` is generated at your specified folder. - -.. note :: We recommend placing it in the default tools folder for Arduino Ameba. When navigating to the designated tools folder on your target operating system, create a new folder called "misc" and put the OTA image ``OTA_All.bin`` within it. - - * *a. Windows* - C:\\Users\\username\\AppData\\Local\\Arduino15\\packages\\realtek\\tools\\ameba_d_tools\\x.x.x\\misc - * *b. Linux* - /home/username/.arduino15/packages/Realtek/tools/ameba_d_tools/x.x.x/misc - * *c. MacOS* - /Users/username/Library/Arduino15/packages/Realtek/tools/ameba_d_tools/x.x.x/misc - -Upload and Transfer OTA Image -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Upload ``OTA_All.bin`` (or renamed ``OTA_All.bin``) to the webpage UI for OTA transfer to AmebaD, as shown in the figure below: - -|image10| - -Once uploaded, select the device(s) to perform OTA transfer: - -|image11| - -Click Start OTA to begin OTA transfer. You will see the change of OTA state while the firmware is being updated on the board(s), as shown in the figure below. - -|image12| - -The board will automatically reboot with the OTA transferred firmware (i.e. modified NTPClient in this example) once download progress is completed. - -You will see the output generated on serial monitor after reboot. - -Board 1: - -|image13| - -Board 2: - -|image14| - -.. |image01| image:: ../../../../_static/amebad/Example_Guides/OTA/OTA_Http/image01.png - :width: 602 px - :height: 348 px -.. |image02| image:: ../../../../_static/amebad/Example_Guides/OTA/OTA_Http/image02.png - :width: 733 px - :height: 798 px -.. |image03| image:: ../../../../_static/amebad/Example_Guides/OTA/OTA_Http/image03.png - :width: 588 px - :height: 679 px -.. |image04| image:: ../../../../_static/amebad/Example_Guides/OTA/OTA_Http/image04.png - :width: 869 px - :height: 467 px -.. |image05| image:: ../../../../_static/amebad/Example_Guides/OTA/OTA_Http/image05.png - :width: 847 px - :height: 444 px -.. |image06| image:: ../../../../_static/amebad/Example_Guides/OTA/OTA_Http/image06.png - :width: 1280 px - :height: 720 px - :scale: 50% -.. |image07| image:: ../../../../_static/amebad/Example_Guides/OTA/OTA_Http/image07.png - :width: 1168 px - :height: 294 px - :scale: 70% -.. |image08| image:: ../../../../_static/amebad/Example_Guides/OTA/OTA_Http/image08.png - :width: 593 px - :height: 831 px -.. |image09| image:: ../../../../_static/amebad/Example_Guides/OTA/OTA_Http/image09.png - :width: 529 px - :height: 716 px -.. |image10| image:: ../../../../_static/amebad/Example_Guides/OTA/OTA_Http/image10.png - :width: 516 px - :height: 521 px -.. |image11| image:: ../../../../_static/amebad/Example_Guides/OTA/OTA_Http/image11.png - :width: 1280 px - :height: 720 px - :scale: 50% -.. |image12| image:: ../../../../_static/amebad/Example_Guides/OTA/OTA_Http/image12.png - :width: 755 px - :height: 278 px -.. |image13| image:: ../../../../_static/amebad/Example_Guides/OTA/OTA_Http/image13.png - :width: 552 px - :height: 327 px -.. |image14| image:: ../../../../_static/amebad/Example_Guides/OTA/OTA_Http/image14.png - :width: 559 px - :height: 325 px - -Code Reference --------------- - -**Multithreading:** - -Two threads are written in ``start_OTA_threads()`` to ensure successful OTA update. - -Thread 1: For the purpose of connectivity check, the OTA state is sent to the server from AMB82 Mini board. Once received, the OTA state of the board will be shown on the Web UI. - -.. code-block:: c++ - - thread1_id = os_thread_create_arduino(thread1_task, NULL, priority1, stack_size1); - - // First thread is to do keep alive connectivity check (post requests every 5s) - if (thread1_id) { - Serial.println("[OTA] Keep-alive connectivity thread created success-fully."); - } else { - Serial.println("[OTA] Failed to create keep-alive connectivity thread."); - } - -Thread 2: To listen for the OTA begin signal from server, once ``start_ota`` signal is received, AMB82 Mini will request for the firmware to be downloaded via OTA. - -.. code-block:: c++ - - thread2_id = os_thread_create_arduino(thread2_task, NULL, priority1, stack_size2); - - // Second thread is to get the signal to start OTA process. - if (thread2_id) { - Serial.println("[OTA] Start OTA process thread created successfully."); - } else { - Serial.println("[OTA] Failed to create Start OTA process thread."); - } \ No newline at end of file diff --git a/source/ameba_d/aw-cu488/Example_Guides/OTA/index.rst b/source/ameba_d/aw-cu488/Example_Guides/OTA/index.rst deleted file mode 100644 index 9585e41..0000000 --- a/source/ameba_d/aw-cu488/Example_Guides/OTA/index.rst +++ /dev/null @@ -1,7 +0,0 @@ -OTA -=== - -.. toctree:: - :maxdepth: 1 - - Ameba Over-the-Air Firmware Update via HTTP diff --git a/source/ameba_d/aw-cu488/Example_Guides/TensorFlow Lite/TensorFlow Lite - Person Detection.rst b/source/ameba_d/aw-cu488/Example_Guides/TensorFlow Lite/TensorFlow Lite - Person Detection.rst index ea947f7..fb14cea 100644 --- a/source/ameba_d/aw-cu488/Example_Guides/TensorFlow Lite/TensorFlow Lite - Person Detection.rst +++ b/source/ameba_d/aw-cu488/Example_Guides/TensorFlow Lite/TensorFlow Lite - Person Detection.rst @@ -23,7 +23,6 @@ Connect the camera and LEDs to the Ameba board according to the diagram below. |image05| - 1. Download the Ameba customized version of TensorFlow Lite for Microcontrollers library at https://github.com/Ameba-AIoT/ameba-arduino-d/blob/master/Arduino_zip_libraries/Ameba_TensorFlowLite.zip. Follow the instructions at https://docs.arduino.cc/software/ide-v1/tutorials/installing-libraries to install it. 2. Download Ameba_ArduCAM library at https://github.com/Ameba-AIoT/ameba-arduino-d/blob/master/Arduino_zip_libraries/Ameba_ArduCAM.zip. Follow the instructions at https://docs.arduino.cc/software/ide-v1/tutorials/installing-libraries to install it. diff --git a/source/ameba_d/aw-cu488/Example_Guides/index.rst b/source/ameba_d/aw-cu488/Example_Guides/index.rst index 5626160..fea1d38 100644 --- a/source/ameba_d/aw-cu488/Example_Guides/index.rst +++ b/source/ameba_d/aw-cu488/Example_Guides/index.rst @@ -7,7 +7,6 @@ Example Guides AudioCodec/index Basic/index BLE/index - Debugging/index E-Paper/index Flash Memory/index GPIO/index diff --git a/source/ameba_d/bw16-typeb/Example_Guides/E-Paper/E-Paper - Display User-generated QR Code.rst b/source/ameba_d/bw16-typeb/Example_Guides/E-Paper/E-Paper - Display User-generated QR Code.rst index 4b95ff5..56e689f 100644 --- a/source/ameba_d/bw16-typeb/Example_Guides/E-Paper/E-Paper - Display User-generated QR Code.rst +++ b/source/ameba_d/bw16-typeb/Example_Guides/E-Paper/E-Paper - Display User-generated QR Code.rst @@ -69,7 +69,6 @@ https://github.com/waveshare/e-Paper [3] Generate a QR code on the E-paper module: https://eugeniopace.org/qrcode/arduino/eink/2019/07/01/qrcode-on-arduino.html - .. |image03| image:: ../../../../_static/amebad/Example_Guides/E-Paper/Epaper_Display_user_generated_QR_code/image03.png :width: 945 px :height: 390 px diff --git a/source/ameba_d/bw16-typeb/Example_Guides/OTA/Ameba Over-the-Air Firmware Update via HTTP.rst b/source/ameba_d/bw16-typeb/Example_Guides/OTA/Ameba Over-the-Air Firmware Update via HTTP.rst deleted file mode 100644 index d8c04ea..0000000 --- a/source/ameba_d/bw16-typeb/Example_Guides/OTA/Ameba Over-the-Air Firmware Update via HTTP.rst +++ /dev/null @@ -1,201 +0,0 @@ -Ameba Over-the-Air Firmware Update via HTTP -=========================================== - -.. contents:: - :local: - :depth: 2 - -Materials ---------- - -- AmebaD [AMB21 / AMB22 / AMB23 / AMB26 / BW16] x 1 -- Set up of Web UI in a PC - -Example -------- - -Compile and Upload OTA Example -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -In this example, we use a web UI to upload firmware to one or more AmebaD boards. - -For the instructions to set up web UI for AmebaD OTA: Web UI, please click into the link below and perform the steps as shown in the ``README.md``. [https://github.com/Ameba-AioT/ameba-OTA-UI] - -If Ameba OTA Web UI is set up successfully in your PC, you will see the webpage on [http://localhost:3000/], figure below shows the rendering of webpage with no device connected: - -|image01| - -To begin, open the OTA example in Arduino IDE. “File” -> “Examples” -> “AmebaOTA” -> “OTA_Http”. - -|image02| - -Edit the port and server field according to your HTTP server. Usually, you will only need to change the server IP address to your PC's IP address. Do not change the port here unless you change the port in the Web UI too. -Please also modify the SSID and password according to your AP. - -|image03| - -Now, compile and upload this example into each and every board that you have. It can be one board or multiple boards (we will be using two AmebaD boards in this example guide). - -This set up must be done at least once to allow the OTA thread API to be called for the first time. For subsequent firmware updates, as long as ``OTA.h`` is included and ``start_ota_threads`` API is called in the setup function, you do not need to re-upload the code manually. - -Once uploaded, press reset button and get the IP address of the individual AmebaD board on serial monitor. - -**Board 1 IP address: 192.168.3.78** - -|image04| - -**Board 2 IP address: 192.168.3.88** - -|image05| - -Then, go to Ameba OTA Web UI [http://localhost:3000/] to view the connected device(s). - -|image06| - -If you can see the IP address(es) of your AmebaD board(s) on the OTA webpage, it shows that the connection is successful. - -For the steps below, you may disconnect AmebaD from your PC and power up the board with any stable 5V DC power source. The overall connection map of this example guide is shown in the figure below. - -|image07| - -In this tutorial, we will be uploading a NTPClient sketch via OTA. Open the NTPClient example. "File" -> "Examples" -> "NTPClient" -> "Basic". Include the header file ``OTA.h`` and at the end of setup function, add in the API ``start_OTA_threads();``. Also modify the SSID and password according to your AP. Your PC and AMB82 Mini should be connecting to the same local network. Refer to the picture below for the modified NTPClient sketch. - -|image08| - -Compile the modified NTPClient sketch, DO NOT upload after compilation. - -Priority matters: Kindly take note that AmebaD will only boot with the latest compiled firmware. - -Once compilation is done, follow the steps below to generate OTA image. - -Generate OTA Image -~~~~~~~~~~~~~~~~~~ - -|image09| - -1. Look for ``km0_km4_image2.bin file`` in C:\\Users\\\\AppData\\Local\\Arduino15\\packages\\realtek\\tools\\ameba_d_tools\\x.x.x. This file will be used as the source binary to be converted to an OTA binary later. - -2. Download the ``ImageTool.exe`` from GitHub: https://github.com/Ameba-AIoT/ameba-rtos-d/tree/main/tools/AmebaD/Image_Tool, double click to open it. - -3. Select "OTA_All" as Generate Target type (in red box). - -4. Input Image Version, the default value is "0xFFFFFFFF". - -5. Click Browse button to select target images to be converted to an OTA binary. The address can be ignored. The Memory Layout bar will show the relative positions of the two images. If they overlap, the overlapped area is in red colour for warning. - -6. Click Generate button to specify the name and path of the output file. After the operation is done, the OTA image ``OTA_All.bin`` is generated at your specified folder. - -.. note :: We recommend placing it in the default tools folder for Arduino Ameba. When navigating to the designated tools folder on your target operating system, create a new folder called "misc" and put the OTA image ``OTA_All.bin`` within it. - - * *a. Windows* - C:\\Users\\username\\AppData\\Local\\Arduino15\\packages\\realtek\\tools\\ameba_d_tools\\x.x.x\\misc - * *b. Linux* - /home/username/.arduino15/packages/Realtek/tools/ameba_d_tools/x.x.x/misc - * *c. MacOS* - /Users/username/Library/Arduino15/packages/Realtek/tools/ameba_d_tools/x.x.x/misc - -Upload and Transfer OTA Image -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Upload ``OTA_All.bin`` (or renamed ``OTA_All.bin``) to the webpage UI for OTA transfer to AmebaD, as shown in the figure below: - -|image10| - -Once uploaded, select the device(s) to perform OTA transfer: - -|image11| - -Click Start OTA to begin OTA transfer. You will see the change of OTA state while the firmware is being updated on the board(s), as shown in the figure below. - -|image12| - -The board will automatically reboot with the OTA transferred firmware (i.e. modified NTPClient in this example) once download progress is completed. - -You will see the output generated on serial monitor after reboot. - -Board 1: - -|image13| - -Board 2: - -|image14| - -.. |image01| image:: ../../../../_static/amebad/Example_Guides/OTA/OTA_Http/image01.png - :width: 602 px - :height: 348 px -.. |image02| image:: ../../../../_static/amebad/Example_Guides/OTA/OTA_Http/image02.png - :width: 733 px - :height: 798 px -.. |image03| image:: ../../../../_static/amebad/Example_Guides/OTA/OTA_Http/image03.png - :width: 588 px - :height: 679 px -.. |image04| image:: ../../../../_static/amebad/Example_Guides/OTA/OTA_Http/image04.png - :width: 869 px - :height: 467 px -.. |image05| image:: ../../../../_static/amebad/Example_Guides/OTA/OTA_Http/image05.png - :width: 847 px - :height: 444 px -.. |image06| image:: ../../../../_static/amebad/Example_Guides/OTA/OTA_Http/image06.png - :width: 1280 px - :height: 720 px - :scale: 50% -.. |image07| image:: ../../../../_static/amebad/Example_Guides/OTA/OTA_Http/image07.png - :width: 1168 px - :height: 294 px - :scale: 70% -.. |image08| image:: ../../../../_static/amebad/Example_Guides/OTA/OTA_Http/image08.png - :width: 593 px - :height: 831 px -.. |image09| image:: ../../../../_static/amebad/Example_Guides/OTA/OTA_Http/image09.png - :width: 529 px - :height: 716 px -.. |image10| image:: ../../../../_static/amebad/Example_Guides/OTA/OTA_Http/image10.png - :width: 516 px - :height: 521 px -.. |image11| image:: ../../../../_static/amebad/Example_Guides/OTA/OTA_Http/image11.png - :width: 1280 px - :height: 720 px - :scale: 50% -.. |image12| image:: ../../../../_static/amebad/Example_Guides/OTA/OTA_Http/image12.png - :width: 755 px - :height: 278 px -.. |image13| image:: ../../../../_static/amebad/Example_Guides/OTA/OTA_Http/image13.png - :width: 552 px - :height: 327 px -.. |image14| image:: ../../../../_static/amebad/Example_Guides/OTA/OTA_Http/image14.png - :width: 559 px - :height: 325 px - -Code Reference --------------- - -**Multithreading:** - -Two threads are written in ``start_OTA_threads()`` to ensure successful OTA update. - -Thread 1: For the purpose of connectivity check, the OTA state is sent to the server from AMB82 Mini board. Once received, the OTA state of the board will be shown on the Web UI. - -.. code-block:: c++ - - thread1_id = os_thread_create_arduino(thread1_task, NULL, priority1, stack_size1); - - // First thread is to do keep alive connectivity check (post requests every 5s) - if (thread1_id) { - Serial.println("[OTA] Keep-alive connectivity thread created success-fully."); - } else { - Serial.println("[OTA] Failed to create keep-alive connectivity thread."); - } - -Thread 2: To listen for the OTA begin signal from server, once ``start_ota`` signal is received, AMB82 Mini will request for the firmware to be downloaded via OTA. - -.. code-block:: c++ - - thread2_id = os_thread_create_arduino(thread2_task, NULL, priority1, stack_size2); - - // Second thread is to get the signal to start OTA process. - if (thread2_id) { - Serial.println("[OTA] Start OTA process thread created successfully."); - } else { - Serial.println("[OTA] Failed to create Start OTA process thread."); - } \ No newline at end of file diff --git a/source/ameba_d/bw16-typeb/Example_Guides/OTA/index.rst b/source/ameba_d/bw16-typeb/Example_Guides/OTA/index.rst deleted file mode 100644 index 9585e41..0000000 --- a/source/ameba_d/bw16-typeb/Example_Guides/OTA/index.rst +++ /dev/null @@ -1,7 +0,0 @@ -OTA -=== - -.. toctree:: - :maxdepth: 1 - - Ameba Over-the-Air Firmware Update via HTTP diff --git a/source/ameba_d/bw16-typeb/Example_Guides/index.rst b/source/ameba_d/bw16-typeb/Example_Guides/index.rst index e5d7c3b..8a774bb 100644 --- a/source/ameba_d/bw16-typeb/Example_Guides/index.rst +++ b/source/ameba_d/bw16-typeb/Example_Guides/index.rst @@ -6,7 +6,6 @@ Example Guides Basic/index BLE/index - Debugging/index E-Paper/index Flash Memory/index GPIO/index diff --git a/source/ameba_d/bw16-typec/Example_Guides/E-Paper/E-Paper - Display User-generated QR Code.rst b/source/ameba_d/bw16-typec/Example_Guides/E-Paper/E-Paper - Display User-generated QR Code.rst index c623ec4..f9b56f4 100644 --- a/source/ameba_d/bw16-typec/Example_Guides/E-Paper/E-Paper - Display User-generated QR Code.rst +++ b/source/ameba_d/bw16-typec/Example_Guides/E-Paper/E-Paper - Display User-generated QR Code.rst @@ -69,7 +69,6 @@ https://github.com/waveshare/e-Paper [3] Generate a QR code on the E-paper module: https://eugeniopace.org/qrcode/arduino/eink/2019/07/01/qrcode-on-arduino.html - .. |image04| image:: ../../../../_static/amebad/Example_Guides/E-Paper/Epaper_Display_user_generated_QR_code/image04.png :width: 817 px :height: 387 px diff --git a/source/ameba_d/bw16-typec/Example_Guides/OTA/Ameba Over-the-Air Firmware Update via HTTP.rst b/source/ameba_d/bw16-typec/Example_Guides/OTA/Ameba Over-the-Air Firmware Update via HTTP.rst deleted file mode 100644 index d8c04ea..0000000 --- a/source/ameba_d/bw16-typec/Example_Guides/OTA/Ameba Over-the-Air Firmware Update via HTTP.rst +++ /dev/null @@ -1,201 +0,0 @@ -Ameba Over-the-Air Firmware Update via HTTP -=========================================== - -.. contents:: - :local: - :depth: 2 - -Materials ---------- - -- AmebaD [AMB21 / AMB22 / AMB23 / AMB26 / BW16] x 1 -- Set up of Web UI in a PC - -Example -------- - -Compile and Upload OTA Example -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -In this example, we use a web UI to upload firmware to one or more AmebaD boards. - -For the instructions to set up web UI for AmebaD OTA: Web UI, please click into the link below and perform the steps as shown in the ``README.md``. [https://github.com/Ameba-AioT/ameba-OTA-UI] - -If Ameba OTA Web UI is set up successfully in your PC, you will see the webpage on [http://localhost:3000/], figure below shows the rendering of webpage with no device connected: - -|image01| - -To begin, open the OTA example in Arduino IDE. “File” -> “Examples” -> “AmebaOTA” -> “OTA_Http”. - -|image02| - -Edit the port and server field according to your HTTP server. Usually, you will only need to change the server IP address to your PC's IP address. Do not change the port here unless you change the port in the Web UI too. -Please also modify the SSID and password according to your AP. - -|image03| - -Now, compile and upload this example into each and every board that you have. It can be one board or multiple boards (we will be using two AmebaD boards in this example guide). - -This set up must be done at least once to allow the OTA thread API to be called for the first time. For subsequent firmware updates, as long as ``OTA.h`` is included and ``start_ota_threads`` API is called in the setup function, you do not need to re-upload the code manually. - -Once uploaded, press reset button and get the IP address of the individual AmebaD board on serial monitor. - -**Board 1 IP address: 192.168.3.78** - -|image04| - -**Board 2 IP address: 192.168.3.88** - -|image05| - -Then, go to Ameba OTA Web UI [http://localhost:3000/] to view the connected device(s). - -|image06| - -If you can see the IP address(es) of your AmebaD board(s) on the OTA webpage, it shows that the connection is successful. - -For the steps below, you may disconnect AmebaD from your PC and power up the board with any stable 5V DC power source. The overall connection map of this example guide is shown in the figure below. - -|image07| - -In this tutorial, we will be uploading a NTPClient sketch via OTA. Open the NTPClient example. "File" -> "Examples" -> "NTPClient" -> "Basic". Include the header file ``OTA.h`` and at the end of setup function, add in the API ``start_OTA_threads();``. Also modify the SSID and password according to your AP. Your PC and AMB82 Mini should be connecting to the same local network. Refer to the picture below for the modified NTPClient sketch. - -|image08| - -Compile the modified NTPClient sketch, DO NOT upload after compilation. - -Priority matters: Kindly take note that AmebaD will only boot with the latest compiled firmware. - -Once compilation is done, follow the steps below to generate OTA image. - -Generate OTA Image -~~~~~~~~~~~~~~~~~~ - -|image09| - -1. Look for ``km0_km4_image2.bin file`` in C:\\Users\\\\AppData\\Local\\Arduino15\\packages\\realtek\\tools\\ameba_d_tools\\x.x.x. This file will be used as the source binary to be converted to an OTA binary later. - -2. Download the ``ImageTool.exe`` from GitHub: https://github.com/Ameba-AIoT/ameba-rtos-d/tree/main/tools/AmebaD/Image_Tool, double click to open it. - -3. Select "OTA_All" as Generate Target type (in red box). - -4. Input Image Version, the default value is "0xFFFFFFFF". - -5. Click Browse button to select target images to be converted to an OTA binary. The address can be ignored. The Memory Layout bar will show the relative positions of the two images. If they overlap, the overlapped area is in red colour for warning. - -6. Click Generate button to specify the name and path of the output file. After the operation is done, the OTA image ``OTA_All.bin`` is generated at your specified folder. - -.. note :: We recommend placing it in the default tools folder for Arduino Ameba. When navigating to the designated tools folder on your target operating system, create a new folder called "misc" and put the OTA image ``OTA_All.bin`` within it. - - * *a. Windows* - C:\\Users\\username\\AppData\\Local\\Arduino15\\packages\\realtek\\tools\\ameba_d_tools\\x.x.x\\misc - * *b. Linux* - /home/username/.arduino15/packages/Realtek/tools/ameba_d_tools/x.x.x/misc - * *c. MacOS* - /Users/username/Library/Arduino15/packages/Realtek/tools/ameba_d_tools/x.x.x/misc - -Upload and Transfer OTA Image -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Upload ``OTA_All.bin`` (or renamed ``OTA_All.bin``) to the webpage UI for OTA transfer to AmebaD, as shown in the figure below: - -|image10| - -Once uploaded, select the device(s) to perform OTA transfer: - -|image11| - -Click Start OTA to begin OTA transfer. You will see the change of OTA state while the firmware is being updated on the board(s), as shown in the figure below. - -|image12| - -The board will automatically reboot with the OTA transferred firmware (i.e. modified NTPClient in this example) once download progress is completed. - -You will see the output generated on serial monitor after reboot. - -Board 1: - -|image13| - -Board 2: - -|image14| - -.. |image01| image:: ../../../../_static/amebad/Example_Guides/OTA/OTA_Http/image01.png - :width: 602 px - :height: 348 px -.. |image02| image:: ../../../../_static/amebad/Example_Guides/OTA/OTA_Http/image02.png - :width: 733 px - :height: 798 px -.. |image03| image:: ../../../../_static/amebad/Example_Guides/OTA/OTA_Http/image03.png - :width: 588 px - :height: 679 px -.. |image04| image:: ../../../../_static/amebad/Example_Guides/OTA/OTA_Http/image04.png - :width: 869 px - :height: 467 px -.. |image05| image:: ../../../../_static/amebad/Example_Guides/OTA/OTA_Http/image05.png - :width: 847 px - :height: 444 px -.. |image06| image:: ../../../../_static/amebad/Example_Guides/OTA/OTA_Http/image06.png - :width: 1280 px - :height: 720 px - :scale: 50% -.. |image07| image:: ../../../../_static/amebad/Example_Guides/OTA/OTA_Http/image07.png - :width: 1168 px - :height: 294 px - :scale: 70% -.. |image08| image:: ../../../../_static/amebad/Example_Guides/OTA/OTA_Http/image08.png - :width: 593 px - :height: 831 px -.. |image09| image:: ../../../../_static/amebad/Example_Guides/OTA/OTA_Http/image09.png - :width: 529 px - :height: 716 px -.. |image10| image:: ../../../../_static/amebad/Example_Guides/OTA/OTA_Http/image10.png - :width: 516 px - :height: 521 px -.. |image11| image:: ../../../../_static/amebad/Example_Guides/OTA/OTA_Http/image11.png - :width: 1280 px - :height: 720 px - :scale: 50% -.. |image12| image:: ../../../../_static/amebad/Example_Guides/OTA/OTA_Http/image12.png - :width: 755 px - :height: 278 px -.. |image13| image:: ../../../../_static/amebad/Example_Guides/OTA/OTA_Http/image13.png - :width: 552 px - :height: 327 px -.. |image14| image:: ../../../../_static/amebad/Example_Guides/OTA/OTA_Http/image14.png - :width: 559 px - :height: 325 px - -Code Reference --------------- - -**Multithreading:** - -Two threads are written in ``start_OTA_threads()`` to ensure successful OTA update. - -Thread 1: For the purpose of connectivity check, the OTA state is sent to the server from AMB82 Mini board. Once received, the OTA state of the board will be shown on the Web UI. - -.. code-block:: c++ - - thread1_id = os_thread_create_arduino(thread1_task, NULL, priority1, stack_size1); - - // First thread is to do keep alive connectivity check (post requests every 5s) - if (thread1_id) { - Serial.println("[OTA] Keep-alive connectivity thread created success-fully."); - } else { - Serial.println("[OTA] Failed to create keep-alive connectivity thread."); - } - -Thread 2: To listen for the OTA begin signal from server, once ``start_ota`` signal is received, AMB82 Mini will request for the firmware to be downloaded via OTA. - -.. code-block:: c++ - - thread2_id = os_thread_create_arduino(thread2_task, NULL, priority1, stack_size2); - - // Second thread is to get the signal to start OTA process. - if (thread2_id) { - Serial.println("[OTA] Start OTA process thread created successfully."); - } else { - Serial.println("[OTA] Failed to create Start OTA process thread."); - } \ No newline at end of file diff --git a/source/ameba_d/bw16-typec/Example_Guides/OTA/index.rst b/source/ameba_d/bw16-typec/Example_Guides/OTA/index.rst deleted file mode 100644 index 9585e41..0000000 --- a/source/ameba_d/bw16-typec/Example_Guides/OTA/index.rst +++ /dev/null @@ -1,7 +0,0 @@ -OTA -=== - -.. toctree:: - :maxdepth: 1 - - Ameba Over-the-Air Firmware Update via HTTP diff --git a/source/ameba_d/bw16-typec/Example_Guides/index.rst b/source/ameba_d/bw16-typec/Example_Guides/index.rst index a42284e..ccc2f37 100644 --- a/source/ameba_d/bw16-typec/Example_Guides/index.rst +++ b/source/ameba_d/bw16-typec/Example_Guides/index.rst @@ -6,7 +6,6 @@ Example Guides Basic/index BLE/index - Debugging/index E-Paper/index Flash Memory/index GPIO/index diff --git a/source/ameba_pro2/amb82-mini/Example_Guides/Neural Network/Multimedia AI/Text-to-Speech NTP.rst b/source/ameba_pro2/amb82-mini/Example_Guides/Neural Network/Multimedia AI/Text-to-Speech NTP.rst index 343ea50..601346c 100644 --- a/source/ameba_pro2/amb82-mini/Example_Guides/Neural Network/Multimedia AI/Text-to-Speech NTP.rst +++ b/source/ameba_pro2/amb82-mini/Example_Guides/Neural Network/Multimedia AI/Text-to-Speech NTP.rst @@ -8,6 +8,8 @@ Text-to-Speech NTP Materials --------- +- MicroSD card + - `AMB82-mini `_ x 1 Example diff --git a/source/ameba_pro2/amb82-mini/Example_Guides/Neural Network/Multimedia AI/Text-to-Speech.rst b/source/ameba_pro2/amb82-mini/Example_Guides/Neural Network/Multimedia AI/Text-to-Speech.rst index 5ff6143..4a77270 100644 --- a/source/ameba_pro2/amb82-mini/Example_Guides/Neural Network/Multimedia AI/Text-to-Speech.rst +++ b/source/ameba_pro2/amb82-mini/Example_Guides/Neural Network/Multimedia AI/Text-to-Speech.rst @@ -13,6 +13,8 @@ Text-to-Speech Materials --------- +- MicroSD card + - `AMB82-mini `_ x 1 Example diff --git a/source/ameba_pro2/amb82-mini/Example_Guides/Neural Network/Multimedia AI/index.rst b/source/ameba_pro2/amb82-mini/Example_Guides/Neural Network/Multimedia AI/index.rst index 702000e..8d80fec 100644 --- a/source/ameba_pro2/amb82-mini/Example_Guides/Neural Network/Multimedia AI/index.rst +++ b/source/ameba_pro2/amb82-mini/Example_Guides/Neural Network/Multimedia AI/index.rst @@ -2,7 +2,7 @@ Multimedia AI ============= .. toctree:: - :maxdepth: 2 + :maxdepth: 1 Generative AI Speech Generative AI Vision diff --git a/source/custom_script.py b/source/custom_script.py index 15da061..459cf6f 100644 --- a/source/custom_script.py +++ b/source/custom_script.py @@ -13,7 +13,7 @@ , '_common/ameba_d/Example_Guides/NTP', '_common/ameba_d/Example_Guides/RTC', '_common/ameba_d/API_Documents/Gtimer', '_common/ameba_d/API_Documents/Http', '_common/ameba_d/API_Documents/IRDevice' , '_common/ameba_d/API_Documents/MDNS', '_common/ameba_d/API_Documents/MQTTClient', '_common/ameba_d/API_Documents/NTPClient', '_common/ameba_d/API_Documents/PowerSave', '_common/ameba_d/API_Documents/RTC' , '_common/ameba_d/API_Documents/SoftwareSerial', '_common/ameba_d/API_Documents/SPI', '_common/ameba_d/API_Documents/Sys', '_common/ameba_d/API_Documents/USB', '_common/ameba_d/API_Documents/WDT' - , '_common/ameba_d/API_Documents/Wire', '_common/ameba_d/API_Documents/WS2812B', '_common/ameba_d/Example_Guides/BLE', '_common/ameba_d/Example_Guides/Debugging', '_common/ameba_d/Example_Guides/Flash Memory' + , '_common/ameba_d/API_Documents/Wire', '_common/ameba_d/API_Documents/WS2812B', '_common/ameba_d/Example_Guides/BLE', '_common/ameba_d/Example_Guides/Flash Memory' , '_common/ameba_d/Example_Guides/GPIO', '_common/ameba_d/Example_Guides/GTimer', '_common/ameba_d/Example_Guides/I2C', '_common/ameba_d/Example_Guides/IPv6', '_common/ameba_d/Example_Guides/MDNS' , '_common/ameba_d/Example_Guides/MQTT', '_common/ameba_d/Example_Guides/PWM', '_common/ameba_d/Example_Guides/UART', '_common/ameba_d/Example_Guides/WDT', '_common/ameba_d/Example_Guides/WS2812B' , '_common/ameba_d/Example_Guides/SYS'], @@ -24,7 +24,7 @@ , '_common/ameba_d/Example_Guides/NTP', '_common/ameba_d/Example_Guides/RTC', '_common/ameba_d/API_Documents/Gtimer', '_common/ameba_d/API_Documents/Http', '_common/ameba_d/API_Documents/IRDevice' , '_common/ameba_d/API_Documents/MDNS', '_common/ameba_d/API_Documents/MQTTClient', '_common/ameba_d/API_Documents/NTPClient', '_common/ameba_d/API_Documents/PowerSave', '_common/ameba_d/API_Documents/RTC' , '_common/ameba_d/API_Documents/SoftwareSerial', '_common/ameba_d/API_Documents/SPI', '_common/ameba_d/API_Documents/Sys', '_common/ameba_d/API_Documents/USB', '_common/ameba_d/API_Documents/WDT' - , '_common/ameba_d/API_Documents/Wire', '_common/ameba_d/API_Documents/WS2812B', '_common/ameba_d/Example_Guides/BLE', '_common/ameba_d/Example_Guides/Debugging', '_common/ameba_d/Example_Guides/Flash Memory' + , '_common/ameba_d/API_Documents/Wire', '_common/ameba_d/API_Documents/WS2812B', '_common/ameba_d/Example_Guides/BLE', '_common/ameba_d/Example_Guides/Flash Memory' , '_common/ameba_d/Example_Guides/GPIO', '_common/ameba_d/Example_Guides/GTimer', '_common/ameba_d/Example_Guides/I2C', '_common/ameba_d/Example_Guides/IPv6', '_common/ameba_d/Example_Guides/MDNS' , '_common/ameba_d/Example_Guides/MQTT', '_common/ameba_d/Example_Guides/PWM', '_common/ameba_d/Example_Guides/UART', '_common/ameba_d/Example_Guides/WDT', '_common/ameba_d/Example_Guides/WS2812B' , '_common/ameba_d/Example_Guides/SYS'], @@ -35,7 +35,7 @@ , '_common/ameba_d/Example_Guides/NTP', '_common/ameba_d/Example_Guides/RTC', '_common/ameba_d/API_Documents/Gtimer', '_common/ameba_d/API_Documents/Http', '_common/ameba_d/API_Documents/IRDevice' , '_common/ameba_d/API_Documents/MDNS', '_common/ameba_d/API_Documents/MQTTClient', '_common/ameba_d/API_Documents/NTPClient', '_common/ameba_d/API_Documents/PowerSave', '_common/ameba_d/API_Documents/RTC' , '_common/ameba_d/API_Documents/SoftwareSerial', '_common/ameba_d/API_Documents/SPI', '_common/ameba_d/API_Documents/Sys', '_common/ameba_d/API_Documents/USB', '_common/ameba_d/API_Documents/WDT' - , '_common/ameba_d/API_Documents/Wire', '_common/ameba_d/API_Documents/WS2812B', '_common/ameba_d/Example_Guides/BLE', '_common/ameba_d/Example_Guides/Debugging', '_common/ameba_d/Example_Guides/Flash Memory' + , '_common/ameba_d/API_Documents/Wire', '_common/ameba_d/API_Documents/WS2812B', '_common/ameba_d/Example_Guides/BLE', '_common/ameba_d/Example_Guides/Flash Memory' , '_common/ameba_d/Example_Guides/GPIO', '_common/ameba_d/Example_Guides/GTimer', '_common/ameba_d/Example_Guides/I2C', '_common/ameba_d/Example_Guides/IPv6', '_common/ameba_d/Example_Guides/MDNS' , '_common/ameba_d/Example_Guides/MQTT', '_common/ameba_d/Example_Guides/PWM', '_common/ameba_d/Example_Guides/UART', '_common/ameba_d/Example_Guides/WDT', '_common/ameba_d/Example_Guides/WS2812B' , '_common/ameba_d/Example_Guides/SYS'], @@ -46,7 +46,7 @@ , '_common/ameba_d/Example_Guides/NTP', '_common/ameba_d/Example_Guides/RTC', '_common/ameba_d/API_Documents/Gtimer', '_common/ameba_d/API_Documents/Http', '_common/ameba_d/API_Documents/IRDevice' , '_common/ameba_d/API_Documents/MDNS', '_common/ameba_d/API_Documents/MQTTClient', '_common/ameba_d/API_Documents/NTPClient', '_common/ameba_d/API_Documents/PowerSave', '_common/ameba_d/API_Documents/RTC' , '_common/ameba_d/API_Documents/SoftwareSerial', '_common/ameba_d/API_Documents/SPI', '_common/ameba_d/API_Documents/Sys', '_common/ameba_d/API_Documents/USB', '_common/ameba_d/API_Documents/WDT' - , '_common/ameba_d/API_Documents/Wire', '_common/ameba_d/API_Documents/WS2812B', '_common/ameba_d/Example_Guides/BLE', '_common/ameba_d/Example_Guides/Debugging', '_common/ameba_d/Example_Guides/Flash Memory' + , '_common/ameba_d/API_Documents/Wire', '_common/ameba_d/API_Documents/WS2812B', '_common/ameba_d/Example_Guides/BLE', '_common/ameba_d/Example_Guides/Flash Memory' , '_common/ameba_d/Example_Guides/GPIO', '_common/ameba_d/Example_Guides/GTimer', '_common/ameba_d/Example_Guides/I2C', '_common/ameba_d/Example_Guides/IPv6', '_common/ameba_d/Example_Guides/MDNS' , '_common/ameba_d/Example_Guides/MQTT', '_common/ameba_d/Example_Guides/PWM', '_common/ameba_d/Example_Guides/UART', '_common/ameba_d/Example_Guides/WDT', '_common/ameba_d/Example_Guides/WS2812B' , '_common/ameba_d/Example_Guides/SYS'], @@ -57,7 +57,7 @@ , '_common/ameba_d/Example_Guides/NTP', '_common/ameba_d/Example_Guides/RTC', '_common/ameba_d/API_Documents/Gtimer', '_common/ameba_d/API_Documents/Http', '_common/ameba_d/API_Documents/IRDevice' , '_common/ameba_d/API_Documents/MDNS', '_common/ameba_d/API_Documents/MQTTClient', '_common/ameba_d/API_Documents/NTPClient', '_common/ameba_d/API_Documents/PowerSave', '_common/ameba_d/API_Documents/RTC' , '_common/ameba_d/API_Documents/SoftwareSerial', '_common/ameba_d/API_Documents/SPI', '_common/ameba_d/API_Documents/Sys', '_common/ameba_d/API_Documents/USB', '_common/ameba_d/API_Documents/WDT' - , '_common/ameba_d/API_Documents/Wire', '_common/ameba_d/API_Documents/WS2812B', '_common/ameba_d/Example_Guides/BLE', '_common/ameba_d/Example_Guides/Debugging', '_common/ameba_d/Example_Guides/Flash Memory' + , '_common/ameba_d/API_Documents/Wire', '_common/ameba_d/API_Documents/WS2812B', '_common/ameba_d/Example_Guides/BLE', '_common/ameba_d/Example_Guides/Flash Memory' , '_common/ameba_d/Example_Guides/GPIO', '_common/ameba_d/Example_Guides/GTimer', '_common/ameba_d/Example_Guides/I2C', '_common/ameba_d/Example_Guides/IPv6', '_common/ameba_d/Example_Guides/MDNS' , '_common/ameba_d/Example_Guides/MQTT', '_common/ameba_d/Example_Guides/PWM', '_common/ameba_d/Example_Guides/UART', '_common/ameba_d/Example_Guides/WDT', '_common/ameba_d/Example_Guides/WS2812B' , '_common/ameba_d/Example_Guides/SYS'], @@ -68,7 +68,7 @@ , '_common/ameba_d/Example_Guides/NTP', '_common/ameba_d/Example_Guides/RTC', '_common/ameba_d/API_Documents/Gtimer', '_common/ameba_d/API_Documents/Http', '_common/ameba_d/API_Documents/IRDevice' , '_common/ameba_d/API_Documents/MDNS', '_common/ameba_d/API_Documents/MQTTClient', '_common/ameba_d/API_Documents/NTPClient', '_common/ameba_d/API_Documents/PowerSave', '_common/ameba_d/API_Documents/RTC' , '_common/ameba_d/API_Documents/SoftwareSerial', '_common/ameba_d/API_Documents/SPI', '_common/ameba_d/API_Documents/Sys', '_common/ameba_d/API_Documents/USB', '_common/ameba_d/API_Documents/WDT' - , '_common/ameba_d/API_Documents/Wire', '_common/ameba_d/API_Documents/WS2812B', '_common/ameba_d/Example_Guides/BLE', '_common/ameba_d/Example_Guides/Debugging', '_common/ameba_d/Example_Guides/Flash Memory' + , '_common/ameba_d/API_Documents/Wire', '_common/ameba_d/API_Documents/WS2812B', '_common/ameba_d/Example_Guides/BLE', '_common/ameba_d/Example_Guides/Flash Memory' , '_common/ameba_d/Example_Guides/GPIO', '_common/ameba_d/Example_Guides/GTimer', '_common/ameba_d/Example_Guides/I2C', '_common/ameba_d/Example_Guides/IPv6', '_common/ameba_d/Example_Guides/MDNS' , '_common/ameba_d/Example_Guides/MQTT', '_common/ameba_d/Example_Guides/PWM', '_common/ameba_d/Example_Guides/UART', '_common/ameba_d/Example_Guides/WDT', '_common/ameba_d/Example_Guides/WS2812B' , '_common/ameba_d/Example_Guides/SYS'], @@ -79,7 +79,7 @@ , '_common/ameba_d/Example_Guides/NTP', '_common/ameba_d/Example_Guides/RTC', '_common/ameba_d/API_Documents/Gtimer', '_common/ameba_d/API_Documents/Http', '_common/ameba_d/API_Documents/IRDevice' , '_common/ameba_d/API_Documents/MDNS', '_common/ameba_d/API_Documents/MQTTClient', '_common/ameba_d/API_Documents/NTPClient', '_common/ameba_d/API_Documents/PowerSave', '_common/ameba_d/API_Documents/RTC' , '_common/ameba_d/API_Documents/SoftwareSerial', '_common/ameba_d/API_Documents/SPI', '_common/ameba_d/API_Documents/Sys', '_common/ameba_d/API_Documents/USB', '_common/ameba_d/API_Documents/WDT' - , '_common/ameba_d/API_Documents/Wire', '_common/ameba_d/API_Documents/WS2812B', '_common/ameba_d/Example_Guides/BLE', '_common/ameba_d/Example_Guides/Debugging', '_common/ameba_d/Example_Guides/Flash Memory' + , '_common/ameba_d/API_Documents/Wire', '_common/ameba_d/API_Documents/WS2812B', '_common/ameba_d/Example_Guides/BLE', '_common/ameba_d/Example_Guides/Flash Memory' , '_common/ameba_d/Example_Guides/GPIO', '_common/ameba_d/Example_Guides/GTimer', '_common/ameba_d/Example_Guides/I2C', '_common/ameba_d/Example_Guides/IPv6', '_common/ameba_d/Example_Guides/MDNS' , '_common/ameba_d/Example_Guides/MQTT', '_common/ameba_d/Example_Guides/PWM', '_common/ameba_d/Example_Guides/UART', '_common/ameba_d/Example_Guides/WDT', '_common/ameba_d/Example_Guides/WS2812B' , '_common/ameba_d/Example_Guides/SYS'],