diff --git a/bak/ambd/_common/Example_Guides/HTTP/HTTP - Retrieve HTTP websites from the Internet.rst b/bak/ambd/_common/Example_Guides/HTTP/HTTP - Retrieve HTTP websites from the Internet.rst deleted file mode 100644 index ec502cd..0000000 --- a/bak/ambd/_common/Example_Guides/HTTP/HTTP - Retrieve HTTP websites from the Internet.rst +++ /dev/null @@ -1,73 +0,0 @@ -############################################################################### -HTTP - Retrieve HTTP websites from the Internet -############################################################################### - -.. role:: raw-html(raw) - :format: html - -:raw-html:`
` -**Materials** -:raw-html:`
` - - - AmebaD [AMB21 / AMB22 / AMB23 / BW16] x 1 - -:raw-html:`` -**Example** -:raw-html:`
` - -In this example, the HttpClient library is used to retrieve a webpage -using the HTTP protocol. -First, make sure that the correct Ameba development board is selected -in “Tools” → “Board” -Then open ``“File” → “Examples” → “AmebaHttp” → “SimpleHttpExample”`` - - |1| - -In the sample code, modify the highlighted section to enter the information -required (ssid, password, key index) to connect to your WiFi network. - - |2| - -Upload the code and press the reset button on Ameba once the upload is -finished. Open the serial monitor in the Arduino IDE and you can see -the information retrieved from the website. - - - |3| - -:raw-html:`` -**Code Reference** -:raw-html:`
` - -Use ``WiFi.begin()`` to establish WiFi connection: -https://www.arduino.cc/en/Reference/WiFiBegin - -To get the information of a WiFi connection: -Use ``WiFi.SSID()`` to get SSID of the current connected network. -https://www.arduino.cc/en/Reference/WiFiSSID - -Use ``WiFi.RSSI()`` to get the signal strength of the connection. -https://www.arduino.cc/en/Reference/WiFiRSSI - -Use ``WiFi.localIP()`` to get the IP address of Ameba. -https://www.arduino.cc/en/Reference/WiFiLocalIP - -Use WiFiClient to create a client to handle the WiFi connection. -https://www.arduino.cc/en/Reference/WiFiClient - -Use HTTPClient to create a client to handle the HTTP connection. - -Use ``http.get()`` to send a GET request to the website. - -.. |1| image:: /media/ambd_arduino/HTTP_Retrieve_HTTP_Websites_From_The_Internet/image1.png - :width: 721 - :height: 1006 - :scale: 70 % -.. |2| image:: /media/ambd_arduino/HTTP_Retrieve_HTTP_Websites_From_The_Internet/image2.png - :width: 721 - :height: 864 - :scale: 70 % -.. |3| image:: /media/ambd_arduino/HTTP_Retrieve_HTTP_Websites_From_The_Internet/image3.png - :width: 757 - :height: 499 - :scale: 75 % \ No newline at end of file diff --git a/bak/ambd/_common/Example_Guides/HTTP/HTTP - Set up Server to Control LED.rst b/bak/ambd/_common/Example_Guides/HTTP/HTTP - Set up Server to Control LED.rst deleted file mode 100644 index d5b42c8..0000000 --- a/bak/ambd/_common/Example_Guides/HTTP/HTTP - Set up Server to Control LED.rst +++ /dev/null @@ -1,160 +0,0 @@ -########################################################################## -HTTP - Set up Server to Control LED -########################################################################## - -.. role:: raw-html(raw) - :format: html - -:raw-html:`` -**Materials** -:raw-html:`
` - - - AmebaD [AMB21 / AMB22 / AMB23 / BW16] x 1 - - Breadboard x 1 - - LED x 1 - - 1KΩ Resistor x 1 - -:raw-html:`` -**Procedure** -:raw-html:`
` - -In this example, we connect Ameba to WiFi and use Ameba as server, the -user can control the LED on/off through a webpage. - -First, connect Ameba with the LED. -In a LED, the longer pin is the positive pole, and the shorter pin is -the negative pole. So, we connect the shorter pin to GND and connect the -longer pin to D13. Additionally, to avoid the electric current exceeds -the tolerance of the LED and causes damage, we connect a resistance on -the positive pole. - -**AMB21 / AMB22** Wiring Diagram: - -.. image:: /media/ambd_arduino/HTTP_Set_Up_Server_To_Control_LED/image1.png - :align: center - :width: 1598 - :height: 1126 - :scale: 62 % - -**AMB23** Wiring Diagram: - -.. image:: /media/ambd_arduino/HTTP_Set_Up_Server_To_Control_LED/image1-1.png - :align: center - :width: 814 - :height: 758 - :scale: 92 % - -**BW16** Wiring Diagram: - -.. image:: /media/ambd_arduino/HTTP_Set_Up_Server_To_Control_LED/image1-2.png - :align: center - :width: 491 - :height: 457 - :scale: 110 % - -.. note:: - - For BW16 board, you may consider to re-define "LED_PIN" macro to **10** for built-in green LED, or **11** for blue built-in LED, or **12** for red built-in LED to avoid using extra components. - -**BW16-TypeC** Wiring Diagram: - -.. image:: /media/ambd_arduino/HTTP_Set_Up_Server_To_Control_LED/image1-3.png - :align: center - :width: 800 - :height: 835 - :scale: 83 % - -| Then open ``“File” → “Examples” → “WiFi” → “SimpleWebServerWiFi”`` - -.. image:: /media/ambd_arduino/HTTP_Set_Up_Server_To_Control_LED/image2.png - :align: center - :width: 1153 - :height: 956 - :scale: 73 % - -| In the sample code, modify the highlighted snippet to corresponding - information. - -.. image:: /media/ambd_arduino/HTTP_Set_Up_Server_To_Control_LED/image3.png - :align: center - :width: 716 - :height: 867 - :scale: 80 % - -Upload the code and press the reset button on Ameba. When the connection -is established, you will see the message:: - - “To see this page in action, open a browser to http://xxx.xxx.xxx.xxx” - -in the Arduino IDE as shown in the figure: - -.. image:: /media/ambd_arduino/HTTP_Set_Up_Server_To_Control_LED/image4.png - :align: center - :width: 704 - :height: 355 - -Next, open the browser of a computer or a cell phone under the same WiFi -domain, enter the address in the message. - -.. image:: /media/ambd_arduino/HTTP_Set_Up_Server_To_Control_LED/image5.png - :align: center - :width: 1208 - :height: 940 - :scale: 74 % - - -In the webpage, you can turn on/off the LED. - -:raw-html:`` -**Code Reference** -:raw-html:`
` - -Use ``WiFi.begin()`` to establish WiFi connection. -https://www.arduino.cc/en/Reference/WiFiBegin - -To get the information of a WiFi connection: -Use ``WiFi.SSID()`` to get SSID of the current connected network. -https://www.arduino.cc/en/Reference/WiFiSSID - -Use WiFi.RSSI() to get the signal strength of the connection. -https://www.arduino.cc/en/Reference/WiFiRSSI - -Use ``WiFi.localIP()`` to get the IP address of Ameba. -https://www.arduino.cc/en/Reference/WiFiLocalIP - -Use ``WiFiServer server()`` to create a server that listens on the -specified port. -https://www.arduino.cc/en/Reference/WiFiServer - -Use ``server.begin()`` to tell the server to begin listening for incoming -connections. -https://www.arduino.cc/en/Reference/WiFiServerBegin - -Use ``server.available()`` to get a client that is connected to the server -and has data available for reading. -https://www.arduino.cc/en/Reference/WiFiServerAvailable - -Use ``client.connected()`` to get whether or not the client is connected. -https://www.arduino.cc/en/Reference/WiFiClientConnected - -Use ``client.println()`` to print data followed by a carriage return and -newline. -https://www.arduino.cc/en/Reference/WiFiClientPrintln - -Use ``client.print()`` to print data to the server that a client is -connected to. -https://www.arduino.cc/en/Reference/WiFiClientPrint - -Use ``client.available()`` to return the number of bytes available for -reading. -https://www.arduino.cc/en/Reference/WiFiClientAvailable - -Use ``client.read()`` to read the next byte received from the server the -client is connected to. -https://www.arduino.cc/en/Reference/WiFiClientRead - -Use ``client.stop()`` to disconnect from the server the client is -connected to. -https://www.arduino.cc/en/Reference/WiFIClientStop - - diff --git a/bak/ambd/_common/Example_Guides/HTTP/HTTP - Set up Server to Get the Ameba Status.rst b/bak/ambd/_common/Example_Guides/HTTP/HTTP - Set up Server to Get the Ameba Status.rst deleted file mode 100644 index f02dc74..0000000 --- a/bak/ambd/_common/Example_Guides/HTTP/HTTP - Set up Server to Get the Ameba Status.rst +++ /dev/null @@ -1,98 +0,0 @@ -########################################################################## -HTTP - Set up Server to Get the Ameba Status -########################################################################## - -.. role:: raw-html(raw) - :format: html - -:raw-html:`` -**Materials** -:raw-html:`
` - - - AmebaD [AMB21 / AMB22 / AMB23 / BW16] x 1 - -:raw-html:`` -**Example** -:raw-html:`
` - -| In this example, we connect Ameba to WiFi and use Ameba as server to - send message to connected client. -| First, open ``“File” → “Examples” → “WiFi” → “WiFiWebServer”`` - - |1| - -| In the sample code, modify the highlighted snippet and enter the - required information (ssid, password, key index) required to connect to - your WiFi network. - - |2| - -| Upload the code and press the reset button on Ameba. After connecting to - WiFi, Ameba starts to run as server. The IP of the server is shown in - the serial monitor, and port is 80. - - |3| - -| We connect to the server in a browser, and we can see the data sent - from the server. - - |4| - -:raw-html:`` -**Code Reference** -:raw-html:`
` - -| Use ``WiFi.begin()`` to establish WiFi connection. -| https://www.arduino.cc/en/Reference/WiFiBegin -| To get the information of a WiFi connection: -| Use ``WiFi.SSID()`` to get SSID of the current connected network. -| https://www.arduino.cc/en/Reference/WiFiSSID -| Use ``WiFi.RSSI()`` to get the signal strength of the connection. -| https://www.arduino.cc/en/Reference/WiFiRSSI -| se ``WiFi.localIP()`` to get the IP address of Ameba. -| https://www.arduino.cc/en/Reference/WiFiLocalIP -| Use ``WiFiServer server()`` to create a server that listens on the - specified port. -| https://www.arduino.cc/en/Reference/WiFiServer -| Use ``server.begin()`` to tell the server to begin listening for incoming - connections. -| `https://www.arduino.cc/en/Reference/WiFiServerBegin` -**Introduction to IFTTT** -:raw-html:`
` - -IFTTT, known as If This Then That, is a website and mobile app and free -web-based service to create the applets, or the chains of simple -conditional statements. The applet is triggered by changes that occur -within other web services such as Gmail, Facebook, Telegram, Instagram, -Pinterest etc. - -:raw-html:`` -**Preparation** -:raw-html:`
` - - - AmebaD [AMB21 / AMB22 / AMB23 / BW16] x 1 - - An account from https://ifttt.com/ , in order to access IFTTT service\* - - |1| - -.. Note:: - Upon log in, there are several cloud and online services that - are integrated with IFTTT platforms. - -:raw-html:`` -**Example** -:raw-html:`
` - -- Generate Applet from IFTTT - - In this example, we obtain an example of IFTTT Applet to send email to - specified recipient. - - To run the example, HTTP POST feature of the Ameba is used to post a - simple webhook service that is received by IFTTT platform and in turn - be used to trigger a response (sending an email). - - After logging in https://ifttt.com/, click **Create** from the top bar. - - |2| - - Click **“Add”** to add the trigger. - - |3| - - Choose Webhooks service as shown below. Alternatively, search the service - by typing into the search bar. - - |4| - - After that, the available triggers will appear. Choose Receive a Web request. - - |5| - - Next, an Event Name is required to identify the trigger successfully. - In this example, set the Event name as “test_event”. - - |6| - - Next, click **Add** in Then That field to create the action service taken - in response to the last trigger. - - |7| - - Choose Email as the action service. - - |8| - - Click on Send me an email. - - |9| - - Under the template of **Send me an Email**, the contents of the email, - such as subject and body is editable. Click **Create Action** to complete the action. - Take note that **Email service** is offered to the email address registered under - IFTTT account. - - |10| - -- Post the Trigger via Ameba - -| Once the Applet is ready in the IFTTT dashboard, the example program can be flashed - onto the Ameba board to post the HTTP request. -| Open the example code in ``“File” → “Examples” → “WiFi” → “HTTP_IFTTT_Post”`` -| In the example program, edit the following 3 items inside the code to make the - program work. - - 1. The WiFi credentials to connect to the Wi-Fi hotspot or access point of desirable choice. - 2. Under the Host name field, enter the host name of the IFTTT service “maker.ifttt.com”. - 3. Under the Path name field, enter the Event name and key field “/trigger/Event name/with/key/Key Field” - - - Event name: The event name should be the same as the one specified in the IFTTT applet. In this example, the event name is “test_event”. - - Key Field: Available under webhook service in individual IFTTT account. See the next step for the steps to obtain the Key Field. - - |11| - -To obtain a key from documentation tab of the Webhooks, find the webhook service in the -Explore tab. - - |12| - -On the Webhooks service page, click on the Documentation tab. - - |13| - -The key can be found in the documentation page. Also, information on how HTTP request can -be used. - - |14| - -| Once the example is ready, connect to Ameba board via USB Cable. - -| On the Arduino IDE, compile the code and upload the code onto Ameba and press the reset - button. After the event has been successfully fired, “Congratulations! You have fired - the test_event event” can be seen on the serial monitor and an email reminder for this - event will be delivered. - - |15| - -Thereafter an email is sent to recipient email account registered at IFTTT Applet and -email notification will be received. - - |16| - -.. |1| image:: /media/ambd_arduino/HTTP_Use_IFTTT_For_Web_Service/image1.png - :width: 611 - :height: 332 - :scale: 100 % -.. |2| image:: /media/ambd_arduino/HTTP_Use_IFTTT_For_Web_Service/image2.png - :width: 942 - :height: 137 - :scale: 50 % -.. |3| image:: /media/ambd_arduino/HTTP_Use_IFTTT_For_Web_Service/image3.png - :width: 961 - :height: 764 - :scale: 50 % -.. |4| image:: /media/ambd_arduino/HTTP_Use_IFTTT_For_Web_Service/image5.png - :width: 1071 - :height: 610 - :scale: 50 % -.. |5| image:: /media/ambd_arduino/HTTP_Use_IFTTT_For_Web_Service/image6.png - :width: 960 - :height: 855 - :scale: 50 % -.. |6| image:: /media/ambd_arduino/HTTP_Use_IFTTT_For_Web_Service/image7.png - :width: 958 - :height: 766 - :scale: 50 % -.. |7| image:: /media/ambd_arduino/HTTP_Use_IFTTT_For_Web_Service/image8.png - :width: 960 - :height: 742 - :scale: 50 % -.. |8| image:: /media/ambd_arduino/HTTP_Use_IFTTT_For_Web_Service/image9.png - :width: 954 - :height: 574 - :scale: 80 % -.. |9| image:: /media/ambd_arduino/HTTP_Use_IFTTT_For_Web_Service/image10.png - :width: 927 - :height: 785 - :scale: 50 % -.. |10| image:: /media/ambd_arduino/HTTP_Use_IFTTT_For_Web_Service/image11.png - :width: 934 - :height: 857 - :scale: 50 % -.. |11| image:: /media/ambd_arduino/HTTP_Use_IFTTT_For_Web_Service/image16.png - :width: 716 - :height: 867 - :scale: 80 % -.. |12| image:: /media/ambd_arduino/HTTP_Use_IFTTT_For_Web_Service/image13.png - :width: 944 - :height: 433 - :scale: 50 % -.. |13| image:: /media/ambd_arduino/HTTP_Use_IFTTT_For_Web_Service/image14.png - :width: 941 - :height: 486 - :scale: 50 % -.. |14| image:: /media/ambd_arduino/HTTP_Use_IFTTT_For_Web_Service/image15.png - :width: 1337 - :height: 615 - :scale: 50 % -.. |15| image:: /media/ambd_arduino/HTTP_Use_IFTTT_For_Web_Service/image17.png - :width: 770 - :height: 378 - :scale: 70 % -.. |16| image:: /media/ambd_arduino/HTTP_Use_IFTTT_For_Web_Service/image18.png - :width: 1075 - :height: 423 - :scale: 60 % \ No newline at end of file diff --git a/source/_common/ameba_d/Example_Guides/HTTP/HTTP - Retrieve HTTP websites from the Internet.rst b/source/_common/ameba_d/Example_Guides/HTTP/HTTP - Retrieve HTTP websites from the Internet.rst new file mode 100644 index 0000000..805e927 --- /dev/null +++ b/source/_common/ameba_d/Example_Guides/HTTP/HTTP - Retrieve HTTP websites from the Internet.rst @@ -0,0 +1,58 @@ +HTTP - Retrieve HTTP websites from the Internet +================================================ + +.. contents:: + :local: + :depth: 2 + +Materials +--------- + +- AmebaD [AMB21 / AMB22 / AMB23 / AMB25 / AMB26 / BW16 / AW-CU488 Thing Plus] x 1 + +Example +------- + +In this example, the HttpClient library is used to retrieve a webpage using the HTTP protocol. + +First, make sure that the correct Ameba development board is selected in “Tools” -> “Board” + +Then open “File” -> “Examples” -> “AmebaHttp” -> “SimpleHttpExample” + +|image01| + +In the sample code, modify the highlighted section to enter the information required (ssid, password, key index) to connect to your WiFi network. + +|image02| + +Upload the code and press the reset button on Ameba once the upload is finished. Open the serial monitor in the Arduino IDE and you can see the information retrieved from the website. + +|image03| + +Code Reference +---------------- + +| Use WiFi.begin() to establish WiFi connection: +| https://www.arduino.cc/en/Reference/WiFiBegin +| To get the information of a WiFi connection: +| Use WiFi.SSID() to get SSID of the current connected network. +| https://www.arduino.cc/en/Reference/WiFiSSID +| Use WiFi.RSSI() to get the signal strength of the connection. +| https://www.arduino.cc/en/Reference/WiFiRSSI +| Use WiFi.localIP() to get the IP address of Ameba. +| https://www.arduino.cc/en/Reference/WiFiLocalIP +| Use WiFiClient to create a client to handle the WiFi connection. +| https://www.arduino.cc/en/Reference/WiFiClient +| Use HTTPClient to create a client to handle the HTTP connection. +| Use http.get() to send a GET request to the website. + + +.. |image01| image:: ../../../../_static/amebad/Example_Guides/HTTP/HTTP_Retrieve_HTTP_websites_from_the_Internet/image01.png + :width: 511 px + :height: 521 px +.. |image02| image:: ../../../../_static/amebad/Example_Guides/HTTP/HTTP_Retrieve_HTTP_websites_from_the_Internet/image02.png + :width: 568 px + :height: 565 px +.. |image03| image:: ../../../../_static/amebad/Example_Guides/HTTP/HTTP_Retrieve_HTTP_websites_from_the_Internet/image03.png + :width: 940 px + :height: 620 px diff --git a/source/_common/ameba_d/Example_Guides/HTTP/HTTP - Set up Server to Control LED.rst b/source/_common/ameba_d/Example_Guides/HTTP/HTTP - Set up Server to Control LED.rst new file mode 100644 index 0000000..d4107a6 --- /dev/null +++ b/source/_common/ameba_d/Example_Guides/HTTP/HTTP - Set up Server to Control LED.rst @@ -0,0 +1,151 @@ +HTTP - Set up Server to Control LED +===================================== + +.. contents:: + :local: + :depth: 2 + +Materials +--------- + +- AmebaD [AMB21 / AMB22 / AMB23 / AMB25 / AMB26 / BW16 / AW-CU488 Thing Plus] x 1 + +- Breadboard x 1 + +- LED x 1 + +- 1KΩ Resistor x 1 + +Example +------- + +In this example, by connecting Ameba to WiFi and using Ameba as a server, the user can control the LED through a webpage. + +In a LED, the longer pin is the positive pole, and the shorter pin is the negative pole. So, we connect the shorter pin to GND and connect the longer pin to D13. Additionally, to avoid the electric current exceeding the tolerance of the LED and causing damage, we connect a resistor to the positive pole. + +.. only:: amb21 + +|image01| + +.. only:: end amb21 + +.. only:: amb23 + +|image02| + +.. only:: end amb23 + +.. only:: amb25 + +|image03| + +.. only:: end amb25 + +.. only:: amb26 + +|image04| + +.. only:: end amb26 + +.. only:: bw16-typeb + +|image05| + +.. only:: end bw16-typeb + +.. only:: bw16-typec + +|image06| + +.. only:: end bw16-typec + +.. only:: aw-cu488 + +|image07| + +.. only:: end aw-cu488 + +.. Note: + For RTL8720DN(BW16) board, you may consider re-defining “LED_PIN” macro to 10 for built-in green LED, or 11 for blue built-in LED, or 12 for red built-in LED to avoid using extra components. + +Then open “File” -> “Examples” -> “WiFi” -> “SimpleWebServerWiFi” + +|image08| + +Upload the code and press the reset button on Ameba. When the connection is established, you will see the message “To see this page in action, open a browser to http://xxx.xxx.xxx.xxx” in the Arduino IDE, as shown in the figure: + +|image09| + +Next, open the browser of a computer or a cell phone under the same WiFi domain, enter the address in the message. + +|image10| + +In the webpage, you can turn on/off the LED. + +|image11| + +Code Reference +---------------- + +| Use WiFi.begin() to establish WiFi connection. +| https://www.arduino.cc/en/Reference/WiFiBegin +| To get the information of a WiFi connection: +| Use WiFi.SSID() to get SSID of the current connected network. +| https://www.arduino.cc/en/Reference/WiFiSSID +| Use WiFi.RSSI() to get the signal strength of the connection. +| https://www.arduino.cc/en/Reference/WiFiRSSI +| Use WiFi.localIP() to get the IP address of Ameba. +| https://www.arduino.cc/en/Reference/WiFiLocalIP +| Use WiFiServer server() to create a server that listens on the specified port. +| https://www.arduino.cc/en/Reference/WiFiServer +| Use server.begin() to tell the server to begin listening for incoming connections. +| https://www.arduino.cc/en/Reference/WiFiServerBegin +| Use server.available() to get a client that is connected to the server and has data available for reading. +| https://www.arduino.cc/en/Reference/WiFiServerAvailable +| Use client.connected to get whether or not the client is connected. +| https://www.arduino.cc/en/Reference/WiFiClientConnected +| Use client.println() to print data followed by a carriage return and newline. +| https://www.arduino.cc/en/Reference/WiFiClientPrintln +| Use client.print() to print data to the server that a client is connected to. +| https://www.arduino.cc/en/Reference/WiFiClientPrint +| Use client.available() to return the number of bytes available for reading. +| https://www.arduino.cc/en/Reference/WiFiClientAvailable +| Use client.read() to read the next byte received from the server the client is connected to. +| https://www.arduino.cc/en/Reference/WiFiClientRead +| Use client.stop() to disconnect from the server the client is connected to. +| https://www.arduino.cc/en/Reference/WiFIClientStop + + +.. |image01| image:: ../../../../_static/amebad/Example_Guides/HTTP/HTTP_Set_up_Server_to_Control_LED/image01.png + :width: 773 px + :height: 544 px +.. |image02| image:: ../../../../_static/amebad/Example_Guides/HTTP/HTTP_Set_up_Server_to_Control_LED/image02.png + :width: 585 px + :height: 545 px +.. |image03| image:: ../../../../_static/amebad/Example_Guides/HTTP/HTTP_Set_up_Server_to_Control_LED/image03.png + :width: 669 px + :height: 609 px +.. |image04| image:: ../../../../_static/amebad/Example_Guides/HTTP/HTTP_Set_up_Server_to_Control_LED/image04.png + :width: 688 px + :height: 686 px +.. |image05| image:: ../../../../_static/amebad/Example_Guides/HTTP/HTTP_Set_up_Server_to_Control_LED/image05.png + :width: 474 px + :height: 441 px +.. |image06| image:: ../../../../_static/amebad/Example_Guides/HTTP/HTTP_Set_up_Server_to_Control_LED/image06.png + :width: 387 px + :height: 404 px +.. |image07| image:: ../../../../_static/amebad/Example_Guides/HTTP/HTTP_Set_up_Server_to_Control_LED/image07.png + :width: 778 px + :height: 730 px +.. |image08| image:: ../../../../_static/amebad/Example_Guides/HTTP/HTTP_Set_up_Server_to_Control_LED/image08.png + :width: 934 px + :height: 1038 px +.. |image09| image:: ../../../../_static/amebad/Example_Guides/HTTP/HTTP_Set_up_Server_to_Control_LED/image09.png + :width: 602 px + :height: 602 px +.. |image10| image:: ../../../../_static/amebad/Example_Guides/HTTP/HTTP_Set_up_Server_to_Control_LED/image10.png + :width: 738 px + :height: 341 px +.. |image11| image:: ../../../../_static/amebad/Example_Guides/HTTP/HTTP_Set_up_Server_to_Control_LED/image11.png + :width: 658 px + :height: 658 px \ No newline at end of file diff --git a/source/_common/ameba_d/Example_Guides/HTTP/HTTP - Set up Server to Get the Ameba Status.rst b/source/_common/ameba_d/Example_Guides/HTTP/HTTP - Set up Server to Get the Ameba Status.rst new file mode 100644 index 0000000..111444f --- /dev/null +++ b/source/_common/ameba_d/Example_Guides/HTTP/HTTP - Set up Server to Get the Ameba Status.rst @@ -0,0 +1,77 @@ +HTTP - Set up Server to Get the Ameba Status +================================================ + +.. contents:: + :local: + :depth: 2 + +Materials +--------- + +- AmebaD [AMB21 / AMB22 / AMB23 / AMB25 / AMB26 / BW16 / AW-CU488 Thing Plus] x 1 + +Example +------- + +In this example, we connect Ameba to WiFi and use Ameba as server to send message to connected client. + +First, open “File” -> “Examples” -> “WiFi” -> “WiFiWebServer” + +|image01| + +In the sample code, modify the highlighted snippet and enter the required information (ssid, password, key index) required to connect to your WiFi network. + +|image02| + +Upload the code and press the reset button on Ameba. After connecting to WiFi, Ameba starts to run as server. The IP of the server is shown in the serial monitor, and port is 80. + +|image03| + +We connect to the server in a browser, and we can see the data sent from the server. + +|image04| + +Code Reference +---------------- + +| Use WiFi.begin() to establish WiFi connection. +| https://www.arduino.cc/en/Reference/WiFiBegin +| To get the information of a WiFi connection: +| Use WiFi.SSID() to get SSID of the current connected network. +| https://www.arduino.cc/en/Reference/WiFiSSID +| Use WiFi.RSSI() to get the signal strength of the connection. +| https://www.arduino.cc/en/Reference/WiFiRSSI +| se WiFi.localIP() to get the IP address of Ameba. +| https://www.arduino.cc/en/Reference/WiFiLocalIP +| Use WiFiServer server() to create a server that listens on the specified port. +| https://www.arduino.cc/en/Reference/WiFiServer +| Use server.begin() to tell the server to begin listening for incoming connections. +| https://www.arduino.cc/en/Reference/WiFiServerBegin +| Use server.available() to get a client that is connected to the server and has data available for reading. +| https://www.arduino.cc/en/Reference/WiFiServerAvailable +| Use client.connected to check whether or not the client is connected. +| https://www.arduino.cc/en/Reference/WiFiClientConnected +| Use client.println() to print data followed by a carriage return and newline. +| https://www.arduino.cc/en/Reference/WiFiClientPrintln +| Use client.print() to print data to the server that a client is connected to. +| https://www.arduino.cc/en/Reference/WiFiClientPrint +| Use client.available() to return the number of bytes available for reading. +| https://www.arduino.cc/en/Reference/WiFiClientAvailable +| Use client.read() to read the next byte received from the server the client is connected to. +| https://www.arduino.cc/en/Reference/WiFiClientRead +| Use client.stop() to disconnect from the server the client is connected to. +| https://www.arduino.cc/en/Reference/WiFIClientStop + + +.. |image01| image:: ../../../../_static/amebad/Example_Guides/HTTP/HTTP_Set_up_Server_to_Get_the_Ameba_Status/image01.png + :width: 752 px + :height: 623 px +.. |image02| image:: ../../../../_static/amebad/Example_Guides/HTTP/HTTP_Set_up_Server_to_Get_the_Ameba_Status/image02.png + :width: 602 px + :height: 623 px +.. |image03| image:: ../../../../_static/amebad/Example_Guides/HTTP/HTTP_Set_up_Server_to_Get_the_Ameba_Status/image03.png + :width: 940 px + :height: 457 px +.. |image04| image:: ../../../../_static/amebad/Example_Guides/HTTP/HTTP_Set_up_Server_to_Get_the_Ameba_Status/image04.png + :width: 940 px + :height: 732 px diff --git a/source/_common/ameba_d/Example_Guides/HTTP/HTTP - Use IFTTT for Web Service.rst b/source/_common/ameba_d/Example_Guides/HTTP/HTTP - Use IFTTT for Web Service.rst new file mode 100644 index 0000000..13b0832 --- /dev/null +++ b/source/_common/ameba_d/Example_Guides/HTTP/HTTP - Use IFTTT for Web Service.rst @@ -0,0 +1,210 @@ +HTTP - Use IFTTT for Web Service +================================= + +.. contents:: + :local: + :depth: 2 + +IFTTT, known as If This Then That, is a website and mobile app and free +web-based service to create the applets, or the chains of simple +conditional statements. The applet is triggered by changes that occur +within other web services such as Gmail, Facebook, Telegram, Instagram, +Pinterest etc. + +Materials +--------- + +- AmebaD [AMB21 / AMB22 / AMB23 / AMB25 / AMB26 / BW16 / AW-CU488 Thing Plus] x 1 + +- An account from https://ifttt.com/, in order to access IFTTT service* + +|image01| + +.. Note:: + Upon log in, there are several cloud and online services that + are integrated with IFTTT platforms. + +Example +-------- + +- Generate Applet from IFTTT + +In this example, we obtain an example of IFTTT Applet to send email to specified recipient. + +To run the example, HTTP POST feature of the Ameba is used to post a simple webhook service that is received by IFTTT platform and in turn be used to trigger a response (sending an email). + +After logging in https://ifttt.com/, click **Create** from the top bar. + +|image02| + +Click **“Add”** to add the trigger. + +|image03| + +Choose Webhooks service as shown below. Alternatively, search the service by typing into the search bar. + +|image04| + +After that, the available triggers will appear. Choose Receive a Web request. + +|image05| + +Next, an Event Name is required to identify the trigger successfully. In this example, set the Event name as “test_event”. + +|image06| + +Next, click **Add** in Then That field to create the action service taken in response to the last trigger. + +|image07| + +Choose Email as the action service. + +|image08| + +Click on Send me an email. + +|image09| + +Under the template of Send me an Email, the contents of the email, such as subject and body is editable. Click Create Action to complete the action. Take note that Email service is offered to the email address registered under IFTTT account. + +|image10| + +- Post the Trigger via Ameba + +Once the Applet is ready in the IFTTT dashboard, the example program can be flashed onto the Ameba board to post the HTTP request. + +Open the example code in “File” -> “Examples” -> “AmebaHttp” -> “HTTP_IFTTT_Post” + +|image11| + +| In the example program, edit the following 3 items inside the code to make the program work. + +| 1. The WiFi credentials to connect to the Wi-Fi hotspot or access point of desirable choice. +| 2. Under the Host name field, enter the host name of the IFTTT service “maker.ifttt.com”. +| 3. Under the Path name field, enter the Event name and key field “/trigger/Event name/with/key/Key Field” + +- Event name: The event name should be the same as the one specified in the IFTTT applet. In this example, the event name is “test_event”. + +- Key Field: Available under webhook service in individual IFTTT account. See the next step for the steps to obtain the Key Field. + +|image12| + +To obtain a key from documentation tab of the Webhooks, find the webhook service in the Explore tab. + +|image13| + +On the Webhooks service page, click on the Documentation tab. + +|image14| + +The key can be found in the documentation page. Also, information on how HTTP request can be used. + +|image15| + +Once the example is ready, connect to Ameba board via USB Cable. + +On the Arduino IDE, compile the code and upload the code onto Ameba and press the reset button. After the event has been successfully fired, “Congratulations! You have fired the test_event event” can be seen on the serial monitor and an email reminder for this event will be delivered. + +|image16| + +Thereafter an email is sent to recipient email account registered at IFTTT Applet and an email will be received. + +|image17| + +- IFTTT Line Notify + +Alternatively, an example to send a message with the LINE messaging app on iPhone or Android using IFTTT Applet is available. It can be achieved by modifying the “Then That” settings. + +You may follow the same steps previously in “Generate Applet from IFTTT” section to create a Webhooks service as the trigger. The Event Name required to identify the trigger will remain as “test_event”. Next, click the “Add” button in “Then That” field to create the action service taken in response to the last trigger. + +|image18| + +Choose Line as the action service. + +|image19| + +Click on “Send message”. + +|image20| + +Click on “Connect” and login to your Line Account. + +|image21| + +Select LINE account, set the Recipient to “1-on-1 chat with LINE Notify” which means the message triggered by IFTTT will directly send to your chats. Next, input your desired message in the input box under “Message”. For sending images, you can insert a link to your photo in the input box under “Photo URL”. + +|image22| + +On the Arduino IDE, compile the code and upload the code onto Ameba and press the reset button. After the event has been successfully fired, you will receive a message from “LINE Notify” on your Mobile devices or PC. + +|image23| + +.. |image01| image:: ../../../../_static/amebad/Example_Guides/HTTP/HTTP_Use_IFTTT_for_Web_Service/image01.png + :width: 940 px + :height: 511 px +.. |image02| image:: ../../../../_static/amebad/Example_Guides/HTTP/HTTP_Use_IFTTT_for_Web_Service/image02.png + :width: 752 px + :height: 109 px +.. |image03| image:: ../../../../_static/amebad/Example_Guides/HTTP/HTTP_Use_IFTTT_for_Web_Service/image03.png + :width: 525 px + :height: 418 px +.. |image04| image:: ../../../../_static/amebad/Example_Guides/HTTP/HTTP_Use_IFTTT_for_Web_Service/image04.png + :width: 602 px + :height: 328 px +.. |image05| image:: ../../../../_static/amebad/Example_Guides/HTTP/HTTP_Use_IFTTT_for_Web_Service/image05.png + :width: 602 px + :height: 500 px +.. |image06| image:: ../../../../_static/amebad/Example_Guides/HTTP/HTTP_Use_IFTTT_for_Web_Service/image06.png + :width: 752 px + :height: 601 px +.. |image07| image:: ../../../../_static/amebad/Example_Guides/HTTP/HTTP_Use_IFTTT_for_Web_Service/image07.png + :width: 752 px + :height: 581 px +.. |image08| image:: ../../../../_static/amebad/Example_Guides/HTTP/HTTP_Use_IFTTT_for_Web_Service/image08.png + :width: 752 px + :height: 452 px +.. |image09| image:: ../../../../_static/amebad/Example_Guides/HTTP/HTTP_Use_IFTTT_for_Web_Service/image09.png + :width: 602 px + :height: 422 px +.. |image10| image:: ../../../../_static/amebad/Example_Guides/HTTP/HTTP_Use_IFTTT_for_Web_Service/image10.png + :width: 973 px + :height: 1039 px +.. |image11| image:: ../../../../_static/amebad/Example_Guides/HTTP/HTTP_Use_IFTTT_for_Web_Service/image11.png + :width: 602 px + :height: 668 px +.. |image12| image:: ../../../../_static/amebad/Example_Guides/HTTP/HTTP_Use_IFTTT_for_Web_Service/image12.png + :width: 602 px + :height: 668 px +.. |image13| image:: ../../../../_static/amebad/Example_Guides/HTTP/HTTP_Use_IFTTT_for_Web_Service/image13.png + :width: 752 px + :height: 345 px +.. |image14| image:: ../../../../_static/amebad/Example_Guides/HTTP/HTTP_Use_IFTTT_for_Web_Service/image14.png + :width: 752 px + :height: 388 px +.. |image15| image:: ../../../../_static/amebad/Example_Guides/HTTP/HTTP_Use_IFTTT_for_Web_Service/image15.png + :width: 664 px + :height: 305 px +.. |image16| image:: ../../../../_static/amebad/Example_Guides/HTTP/HTTP_Use_IFTTT_for_Web_Service/image16.png + :width: 602 px + :height: 590 px +.. |image17| image:: ../../../../_static/amebad/Example_Guides/HTTP/HTTP_Use_IFTTT_for_Web_Service/image17.png + :width: 598 px + :height: 513 px +.. |image18| image:: ../../../../_static/amebad/Example_Guides/HTTP/HTTP_Use_IFTTT_for_Web_Service/image18.png + :width: 752 px + :height: 542 px +.. |image19| image:: ../../../../_static/amebad/Example_Guides/HTTP/HTTP_Use_IFTTT_for_Web_Service/image19.png + :width: 752 px + :height: 581 px +.. |image20| image:: ../../../../_static/amebad/Example_Guides/HTTP/HTTP_Use_IFTTT_for_Web_Service/image20.png + :width: 467 px + :height: 450 px +.. |image21| image:: ../../../../_static/amebad/Example_Guides/HTTP/HTTP_Use_IFTTT_for_Web_Service/image21.png + :width: 602 px + :height: 652 px +.. |image22| image:: ../../../../_static/amebad/Example_Guides/HTTP/HTTP_Use_IFTTT_for_Web_Service/image22.png + :width: 602 px + :height: 424 px +.. |image23| image:: ../../../../_static/amebad/Example_Guides/HTTP/HTTP_Use_IFTTT_for_Web_Service/image23.png + :width: 356 px + :height: 706 px diff --git a/bak/ambd/_common/Example_Guides/HTTP/index.rst b/source/_common/ameba_d/Example_Guides/HTTP/index.rst similarity index 95% rename from bak/ambd/_common/Example_Guides/HTTP/index.rst rename to source/_common/ameba_d/Example_Guides/HTTP/index.rst index aa74a42..9d15284 100644 --- a/bak/ambd/_common/Example_Guides/HTTP/index.rst +++ b/source/_common/ameba_d/Example_Guides/HTTP/index.rst @@ -1,11 +1,11 @@ -HTTP -==== - -.. toctree:: - :maxdepth: 1 - - HTTP - Retrieve HTTP websites from the Internet - HTTP - Set up Server to Control LED - HTTP - Set up Server to Get the Ameba Status - HTTP - Use IFTTT for Web Service +HTTP +==== + +.. toctree:: + :maxdepth: 1 + + HTTP - Retrieve HTTP websites from the Internet + HTTP - Set up Server to Control LED + HTTP - Set up Server to Get the Ameba Status + HTTP - Use IFTTT for Web Service \ No newline at end of file diff --git a/source/_static/amebad/Example_Guides/HTTP/HTTP_Retrieve HTTP websites from the Internet/image01.png b/source/_static/amebad/Example_Guides/HTTP/HTTP_Retrieve_HTTP_websites_from_the_Internet/image01.png similarity index 100% rename from source/_static/amebad/Example_Guides/HTTP/HTTP_Retrieve HTTP websites from the Internet/image01.png rename to source/_static/amebad/Example_Guides/HTTP/HTTP_Retrieve_HTTP_websites_from_the_Internet/image01.png diff --git a/source/_static/amebad/Example_Guides/HTTP/HTTP_Retrieve HTTP websites from the Internet/image02.png b/source/_static/amebad/Example_Guides/HTTP/HTTP_Retrieve_HTTP_websites_from_the_Internet/image02.png similarity index 100% rename from source/_static/amebad/Example_Guides/HTTP/HTTP_Retrieve HTTP websites from the Internet/image02.png rename to source/_static/amebad/Example_Guides/HTTP/HTTP_Retrieve_HTTP_websites_from_the_Internet/image02.png diff --git a/source/_static/amebad/Example_Guides/HTTP/HTTP_Retrieve HTTP websites from the Internet/image03.png b/source/_static/amebad/Example_Guides/HTTP/HTTP_Retrieve_HTTP_websites_from_the_Internet/image03.png similarity index 100% rename from source/_static/amebad/Example_Guides/HTTP/HTTP_Retrieve HTTP websites from the Internet/image03.png rename to source/_static/amebad/Example_Guides/HTTP/HTTP_Retrieve_HTTP_websites_from_the_Internet/image03.png diff --git a/source/_static/amebad/Example_Guides/HTTP/HTTP_Set up Server to Control LED/image07.png b/source/_static/amebad/Example_Guides/HTTP/HTTP_Set up Server to Control LED/image07.png deleted file mode 100644 index 24a2210..0000000 Binary files a/source/_static/amebad/Example_Guides/HTTP/HTTP_Set up Server to Control LED/image07.png and /dev/null differ diff --git a/source/_static/amebad/Example_Guides/HTTP/HTTP_Set up Server to Control LED/image09.png b/source/_static/amebad/Example_Guides/HTTP/HTTP_Set up Server to Control LED/image09.png deleted file mode 100644 index e04343a..0000000 Binary files a/source/_static/amebad/Example_Guides/HTTP/HTTP_Set up Server to Control LED/image09.png and /dev/null differ diff --git a/source/_static/amebad/Example_Guides/HTTP/HTTP_Set up Server to Control LED/image01.png b/source/_static/amebad/Example_Guides/HTTP/HTTP_Set_up_Server_to_Control_LED/image01.png similarity index 100% rename from source/_static/amebad/Example_Guides/HTTP/HTTP_Set up Server to Control LED/image01.png rename to source/_static/amebad/Example_Guides/HTTP/HTTP_Set_up_Server_to_Control_LED/image01.png diff --git a/source/_static/amebad/Example_Guides/HTTP/HTTP_Set up Server to Control LED/image02.png b/source/_static/amebad/Example_Guides/HTTP/HTTP_Set_up_Server_to_Control_LED/image02.png similarity index 100% rename from source/_static/amebad/Example_Guides/HTTP/HTTP_Set up Server to Control LED/image02.png rename to source/_static/amebad/Example_Guides/HTTP/HTTP_Set_up_Server_to_Control_LED/image02.png diff --git a/source/_static/amebad/Example_Guides/HTTP/HTTP_Set up Server to Control LED/image06.PNG b/source/_static/amebad/Example_Guides/HTTP/HTTP_Set_up_Server_to_Control_LED/image03.png similarity index 100% rename from source/_static/amebad/Example_Guides/HTTP/HTTP_Set up Server to Control LED/image06.PNG rename to source/_static/amebad/Example_Guides/HTTP/HTTP_Set_up_Server_to_Control_LED/image03.png diff --git a/source/_static/amebad/Example_Guides/HTTP/HTTP_Set_up_Server_to_Control_LED/image04.png b/source/_static/amebad/Example_Guides/HTTP/HTTP_Set_up_Server_to_Control_LED/image04.png new file mode 100644 index 0000000..45b2dcb Binary files /dev/null and b/source/_static/amebad/Example_Guides/HTTP/HTTP_Set_up_Server_to_Control_LED/image04.png differ diff --git a/source/_static/amebad/Example_Guides/HTTP/HTTP_Set up Server to Control LED/image03.png b/source/_static/amebad/Example_Guides/HTTP/HTTP_Set_up_Server_to_Control_LED/image05.png similarity index 100% rename from source/_static/amebad/Example_Guides/HTTP/HTTP_Set up Server to Control LED/image03.png rename to source/_static/amebad/Example_Guides/HTTP/HTTP_Set_up_Server_to_Control_LED/image05.png diff --git a/source/_static/amebad/Example_Guides/HTTP/HTTP_Set up Server to Control LED/image04.png b/source/_static/amebad/Example_Guides/HTTP/HTTP_Set_up_Server_to_Control_LED/image06.png similarity index 100% rename from source/_static/amebad/Example_Guides/HTTP/HTTP_Set up Server to Control LED/image04.png rename to source/_static/amebad/Example_Guides/HTTP/HTTP_Set_up_Server_to_Control_LED/image06.png diff --git a/source/_static/amebad/Example_Guides/HTTP/HTTP_Set up Server to Control LED/image05.png b/source/_static/amebad/Example_Guides/HTTP/HTTP_Set_up_Server_to_Control_LED/image07.png similarity index 100% rename from source/_static/amebad/Example_Guides/HTTP/HTTP_Set up Server to Control LED/image05.png rename to source/_static/amebad/Example_Guides/HTTP/HTTP_Set_up_Server_to_Control_LED/image07.png diff --git a/source/_static/amebad/Example_Guides/HTTP/HTTP_Set_up_Server_to_Control_LED/image08.png b/source/_static/amebad/Example_Guides/HTTP/HTTP_Set_up_Server_to_Control_LED/image08.png new file mode 100644 index 0000000..6cd9371 Binary files /dev/null and b/source/_static/amebad/Example_Guides/HTTP/HTTP_Set_up_Server_to_Control_LED/image08.png differ diff --git a/source/_static/amebad/Example_Guides/HTTP/HTTP_Set up Server to Control LED/image08.png b/source/_static/amebad/Example_Guides/HTTP/HTTP_Set_up_Server_to_Control_LED/image09.png similarity index 100% rename from source/_static/amebad/Example_Guides/HTTP/HTTP_Set up Server to Control LED/image08.png rename to source/_static/amebad/Example_Guides/HTTP/HTTP_Set_up_Server_to_Control_LED/image09.png diff --git a/source/_static/amebad/Example_Guides/HTTP/HTTP_Set_up_Server_to_Control_LED/image10.png b/source/_static/amebad/Example_Guides/HTTP/HTTP_Set_up_Server_to_Control_LED/image10.png new file mode 100644 index 0000000..f6b2107 Binary files /dev/null and b/source/_static/amebad/Example_Guides/HTTP/HTTP_Set_up_Server_to_Control_LED/image10.png differ diff --git a/source/_static/amebad/Example_Guides/HTTP/HTTP_Set up Server to Control LED/image10.png b/source/_static/amebad/Example_Guides/HTTP/HTTP_Set_up_Server_to_Control_LED/image11.png similarity index 100% rename from source/_static/amebad/Example_Guides/HTTP/HTTP_Set up Server to Control LED/image10.png rename to source/_static/amebad/Example_Guides/HTTP/HTTP_Set_up_Server_to_Control_LED/image11.png diff --git a/source/_static/amebad/Example_Guides/HTTP/HTTP_Set up Server to Get the Ameba Status/image01.png b/source/_static/amebad/Example_Guides/HTTP/HTTP_Set_up_Server_to_Get_the_Ameba_Status/image01.png similarity index 100% rename from source/_static/amebad/Example_Guides/HTTP/HTTP_Set up Server to Get the Ameba Status/image01.png rename to source/_static/amebad/Example_Guides/HTTP/HTTP_Set_up_Server_to_Get_the_Ameba_Status/image01.png diff --git a/source/_static/amebad/Example_Guides/HTTP/HTTP_Set up Server to Get the Ameba Status/image02.png b/source/_static/amebad/Example_Guides/HTTP/HTTP_Set_up_Server_to_Get_the_Ameba_Status/image02.png similarity index 100% rename from source/_static/amebad/Example_Guides/HTTP/HTTP_Set up Server to Get the Ameba Status/image02.png rename to source/_static/amebad/Example_Guides/HTTP/HTTP_Set_up_Server_to_Get_the_Ameba_Status/image02.png diff --git a/source/_static/amebad/Example_Guides/HTTP/HTTP_Set up Server to Get the Ameba Status/image03.png b/source/_static/amebad/Example_Guides/HTTP/HTTP_Set_up_Server_to_Get_the_Ameba_Status/image03.png similarity index 100% rename from source/_static/amebad/Example_Guides/HTTP/HTTP_Set up Server to Get the Ameba Status/image03.png rename to source/_static/amebad/Example_Guides/HTTP/HTTP_Set_up_Server_to_Get_the_Ameba_Status/image03.png diff --git a/source/_static/amebad/Example_Guides/HTTP/HTTP_Set up Server to Get the Ameba Status/image04.png b/source/_static/amebad/Example_Guides/HTTP/HTTP_Set_up_Server_to_Get_the_Ameba_Status/image04.png similarity index 100% rename from source/_static/amebad/Example_Guides/HTTP/HTTP_Set up Server to Get the Ameba Status/image04.png rename to source/_static/amebad/Example_Guides/HTTP/HTTP_Set_up_Server_to_Get_the_Ameba_Status/image04.png diff --git a/source/_static/amebad/Example_Guides/HTTP/HTTP_Use IFTTT for Web Service/image10.png b/source/_static/amebad/Example_Guides/HTTP/HTTP_Use IFTTT for Web Service/image10.png deleted file mode 100644 index 7175690..0000000 Binary files a/source/_static/amebad/Example_Guides/HTTP/HTTP_Use IFTTT for Web Service/image10.png and /dev/null differ diff --git a/source/_static/amebad/Example_Guides/HTTP/HTTP_Use IFTTT for Web Service/image01.png b/source/_static/amebad/Example_Guides/HTTP/HTTP_Use_IFTTT_for_Web_Service/image01.png similarity index 100% rename from source/_static/amebad/Example_Guides/HTTP/HTTP_Use IFTTT for Web Service/image01.png rename to source/_static/amebad/Example_Guides/HTTP/HTTP_Use_IFTTT_for_Web_Service/image01.png diff --git a/source/_static/amebad/Example_Guides/HTTP/HTTP_Use IFTTT for Web Service/image02.png b/source/_static/amebad/Example_Guides/HTTP/HTTP_Use_IFTTT_for_Web_Service/image02.png similarity index 100% rename from source/_static/amebad/Example_Guides/HTTP/HTTP_Use IFTTT for Web Service/image02.png rename to source/_static/amebad/Example_Guides/HTTP/HTTP_Use_IFTTT_for_Web_Service/image02.png diff --git a/source/_static/amebad/Example_Guides/HTTP/HTTP_Use IFTTT for Web Service/image03.png b/source/_static/amebad/Example_Guides/HTTP/HTTP_Use_IFTTT_for_Web_Service/image03.png similarity index 100% rename from source/_static/amebad/Example_Guides/HTTP/HTTP_Use IFTTT for Web Service/image03.png rename to source/_static/amebad/Example_Guides/HTTP/HTTP_Use_IFTTT_for_Web_Service/image03.png diff --git a/source/_static/amebad/Example_Guides/HTTP/HTTP_Use IFTTT for Web Service/image04.png b/source/_static/amebad/Example_Guides/HTTP/HTTP_Use_IFTTT_for_Web_Service/image04.png similarity index 100% rename from source/_static/amebad/Example_Guides/HTTP/HTTP_Use IFTTT for Web Service/image04.png rename to source/_static/amebad/Example_Guides/HTTP/HTTP_Use_IFTTT_for_Web_Service/image04.png diff --git a/source/_static/amebad/Example_Guides/HTTP/HTTP_Use IFTTT for Web Service/image05.png b/source/_static/amebad/Example_Guides/HTTP/HTTP_Use_IFTTT_for_Web_Service/image05.png similarity index 100% rename from source/_static/amebad/Example_Guides/HTTP/HTTP_Use IFTTT for Web Service/image05.png rename to source/_static/amebad/Example_Guides/HTTP/HTTP_Use_IFTTT_for_Web_Service/image05.png diff --git a/source/_static/amebad/Example_Guides/HTTP/HTTP_Use IFTTT for Web Service/image06.png b/source/_static/amebad/Example_Guides/HTTP/HTTP_Use_IFTTT_for_Web_Service/image06.png similarity index 100% rename from source/_static/amebad/Example_Guides/HTTP/HTTP_Use IFTTT for Web Service/image06.png rename to source/_static/amebad/Example_Guides/HTTP/HTTP_Use_IFTTT_for_Web_Service/image06.png diff --git a/source/_static/amebad/Example_Guides/HTTP/HTTP_Use IFTTT for Web Service/image07.png b/source/_static/amebad/Example_Guides/HTTP/HTTP_Use_IFTTT_for_Web_Service/image07.png similarity index 100% rename from source/_static/amebad/Example_Guides/HTTP/HTTP_Use IFTTT for Web Service/image07.png rename to source/_static/amebad/Example_Guides/HTTP/HTTP_Use_IFTTT_for_Web_Service/image07.png diff --git a/source/_static/amebad/Example_Guides/HTTP/HTTP_Use IFTTT for Web Service/image08.png b/source/_static/amebad/Example_Guides/HTTP/HTTP_Use_IFTTT_for_Web_Service/image08.png similarity index 100% rename from source/_static/amebad/Example_Guides/HTTP/HTTP_Use IFTTT for Web Service/image08.png rename to source/_static/amebad/Example_Guides/HTTP/HTTP_Use_IFTTT_for_Web_Service/image08.png diff --git a/source/_static/amebad/Example_Guides/HTTP/HTTP_Use IFTTT for Web Service/image09.png b/source/_static/amebad/Example_Guides/HTTP/HTTP_Use_IFTTT_for_Web_Service/image09.png similarity index 100% rename from source/_static/amebad/Example_Guides/HTTP/HTTP_Use IFTTT for Web Service/image09.png rename to source/_static/amebad/Example_Guides/HTTP/HTTP_Use_IFTTT_for_Web_Service/image09.png diff --git a/source/_static/amebad/Example_Guides/HTTP/HTTP_Use_IFTTT_for_Web_Service/image10.png b/source/_static/amebad/Example_Guides/HTTP/HTTP_Use_IFTTT_for_Web_Service/image10.png new file mode 100644 index 0000000..bcd1860 Binary files /dev/null and b/source/_static/amebad/Example_Guides/HTTP/HTTP_Use_IFTTT_for_Web_Service/image10.png differ diff --git a/source/_static/amebad/Example_Guides/HTTP/HTTP_Use IFTTT for Web Service/image11.png b/source/_static/amebad/Example_Guides/HTTP/HTTP_Use_IFTTT_for_Web_Service/image11.png similarity index 100% rename from source/_static/amebad/Example_Guides/HTTP/HTTP_Use IFTTT for Web Service/image11.png rename to source/_static/amebad/Example_Guides/HTTP/HTTP_Use_IFTTT_for_Web_Service/image11.png diff --git a/source/_static/amebad/Example_Guides/HTTP/HTTP_Use IFTTT for Web Service/image12.png b/source/_static/amebad/Example_Guides/HTTP/HTTP_Use_IFTTT_for_Web_Service/image12.png similarity index 100% rename from source/_static/amebad/Example_Guides/HTTP/HTTP_Use IFTTT for Web Service/image12.png rename to source/_static/amebad/Example_Guides/HTTP/HTTP_Use_IFTTT_for_Web_Service/image12.png diff --git a/source/_static/amebad/Example_Guides/HTTP/HTTP_Use IFTTT for Web Service/image13.png b/source/_static/amebad/Example_Guides/HTTP/HTTP_Use_IFTTT_for_Web_Service/image13.png similarity index 100% rename from source/_static/amebad/Example_Guides/HTTP/HTTP_Use IFTTT for Web Service/image13.png rename to source/_static/amebad/Example_Guides/HTTP/HTTP_Use_IFTTT_for_Web_Service/image13.png diff --git a/source/_static/amebad/Example_Guides/HTTP/HTTP_Use IFTTT for Web Service/image14.png b/source/_static/amebad/Example_Guides/HTTP/HTTP_Use_IFTTT_for_Web_Service/image14.png similarity index 100% rename from source/_static/amebad/Example_Guides/HTTP/HTTP_Use IFTTT for Web Service/image14.png rename to source/_static/amebad/Example_Guides/HTTP/HTTP_Use_IFTTT_for_Web_Service/image14.png diff --git a/source/_static/amebad/Example_Guides/HTTP/HTTP_Use IFTTT for Web Service/image15.png b/source/_static/amebad/Example_Guides/HTTP/HTTP_Use_IFTTT_for_Web_Service/image15.png similarity index 100% rename from source/_static/amebad/Example_Guides/HTTP/HTTP_Use IFTTT for Web Service/image15.png rename to source/_static/amebad/Example_Guides/HTTP/HTTP_Use_IFTTT_for_Web_Service/image15.png diff --git a/source/_static/amebad/Example_Guides/HTTP/HTTP_Use IFTTT for Web Service/image16.png b/source/_static/amebad/Example_Guides/HTTP/HTTP_Use_IFTTT_for_Web_Service/image16.png similarity index 100% rename from source/_static/amebad/Example_Guides/HTTP/HTTP_Use IFTTT for Web Service/image16.png rename to source/_static/amebad/Example_Guides/HTTP/HTTP_Use_IFTTT_for_Web_Service/image16.png diff --git a/source/_static/amebad/Example_Guides/HTTP/HTTP_Use IFTTT for Web Service/image17.png b/source/_static/amebad/Example_Guides/HTTP/HTTP_Use_IFTTT_for_Web_Service/image17.png similarity index 100% rename from source/_static/amebad/Example_Guides/HTTP/HTTP_Use IFTTT for Web Service/image17.png rename to source/_static/amebad/Example_Guides/HTTP/HTTP_Use_IFTTT_for_Web_Service/image17.png diff --git a/source/_static/amebad/Example_Guides/HTTP/HTTP_Use IFTTT for Web Service/image18.png b/source/_static/amebad/Example_Guides/HTTP/HTTP_Use_IFTTT_for_Web_Service/image18.png similarity index 100% rename from source/_static/amebad/Example_Guides/HTTP/HTTP_Use IFTTT for Web Service/image18.png rename to source/_static/amebad/Example_Guides/HTTP/HTTP_Use_IFTTT_for_Web_Service/image18.png diff --git a/source/_static/amebad/Example_Guides/HTTP/HTTP_Use IFTTT for Web Service/image19.png b/source/_static/amebad/Example_Guides/HTTP/HTTP_Use_IFTTT_for_Web_Service/image19.png similarity index 100% rename from source/_static/amebad/Example_Guides/HTTP/HTTP_Use IFTTT for Web Service/image19.png rename to source/_static/amebad/Example_Guides/HTTP/HTTP_Use_IFTTT_for_Web_Service/image19.png diff --git a/source/_static/amebad/Example_Guides/HTTP/HTTP_Use IFTTT for Web Service/image20.png b/source/_static/amebad/Example_Guides/HTTP/HTTP_Use_IFTTT_for_Web_Service/image20.png similarity index 100% rename from source/_static/amebad/Example_Guides/HTTP/HTTP_Use IFTTT for Web Service/image20.png rename to source/_static/amebad/Example_Guides/HTTP/HTTP_Use_IFTTT_for_Web_Service/image20.png diff --git a/source/_static/amebad/Example_Guides/HTTP/HTTP_Use IFTTT for Web Service/image21.png b/source/_static/amebad/Example_Guides/HTTP/HTTP_Use_IFTTT_for_Web_Service/image21.png similarity index 100% rename from source/_static/amebad/Example_Guides/HTTP/HTTP_Use IFTTT for Web Service/image21.png rename to source/_static/amebad/Example_Guides/HTTP/HTTP_Use_IFTTT_for_Web_Service/image21.png diff --git a/source/_static/amebad/Example_Guides/HTTP/HTTP_Use IFTTT for Web Service/image22.png b/source/_static/amebad/Example_Guides/HTTP/HTTP_Use_IFTTT_for_Web_Service/image22.png similarity index 100% rename from source/_static/amebad/Example_Guides/HTTP/HTTP_Use IFTTT for Web Service/image22.png rename to source/_static/amebad/Example_Guides/HTTP/HTTP_Use_IFTTT_for_Web_Service/image22.png diff --git a/source/_static/amebad/Example_Guides/HTTP/HTTP_Use IFTTT for Web Service/image23.png b/source/_static/amebad/Example_Guides/HTTP/HTTP_Use_IFTTT_for_Web_Service/image23.png similarity index 100% rename from source/_static/amebad/Example_Guides/HTTP/HTTP_Use IFTTT for Web Service/image23.png rename to source/_static/amebad/Example_Guides/HTTP/HTTP_Use_IFTTT_for_Web_Service/image23.png diff --git a/source/ameba_d/amb21/Example_Guides/index.rst b/source/ameba_d/amb21/Example_Guides/index.rst index ca61b2d..b335355 100644 --- a/source/ameba_d/amb21/Example_Guides/index.rst +++ b/source/ameba_d/amb21/Example_Guides/index.rst @@ -6,6 +6,7 @@ Example Guides Basic/index E-Paper/index + HTTP/index OTA/index Power Save/index SPI/index diff --git a/source/ameba_d/amb23/Example_Guides/index.rst b/source/ameba_d/amb23/Example_Guides/index.rst index b12b760..8bf280e 100644 --- a/source/ameba_d/amb23/Example_Guides/index.rst +++ b/source/ameba_d/amb23/Example_Guides/index.rst @@ -8,6 +8,7 @@ Example Guides Basic/index E-Paper/index FatfsSDIO/index + HTTP/index OTA/index Power Save/index SPI/index diff --git a/source/ameba_d/amb25/Example_Guides/index.rst b/source/ameba_d/amb25/Example_Guides/index.rst index ca61b2d..b335355 100644 --- a/source/ameba_d/amb25/Example_Guides/index.rst +++ b/source/ameba_d/amb25/Example_Guides/index.rst @@ -6,6 +6,7 @@ Example Guides Basic/index E-Paper/index + HTTP/index OTA/index Power Save/index SPI/index diff --git a/source/ameba_d/amb26/Example_Guides/index.rst b/source/ameba_d/amb26/Example_Guides/index.rst index ca61b2d..b335355 100644 --- a/source/ameba_d/amb26/Example_Guides/index.rst +++ b/source/ameba_d/amb26/Example_Guides/index.rst @@ -6,6 +6,7 @@ Example Guides Basic/index E-Paper/index + HTTP/index OTA/index Power Save/index SPI/index diff --git a/source/ameba_d/aw-cu488/Example_Guides/index.rst b/source/ameba_d/aw-cu488/Example_Guides/index.rst index ca61b2d..b335355 100644 --- a/source/ameba_d/aw-cu488/Example_Guides/index.rst +++ b/source/ameba_d/aw-cu488/Example_Guides/index.rst @@ -6,6 +6,7 @@ Example Guides Basic/index E-Paper/index + HTTP/index OTA/index Power Save/index SPI/index diff --git a/source/ameba_d/bw16-typeb/Example_Guides/index.rst b/source/ameba_d/bw16-typeb/Example_Guides/index.rst index 168d2a6..9e75361 100644 --- a/source/ameba_d/bw16-typeb/Example_Guides/index.rst +++ b/source/ameba_d/bw16-typeb/Example_Guides/index.rst @@ -6,6 +6,7 @@ Example Guides Basic/index E-Paper/index + HTTP/index OTA/index Power Save/index SPI/index diff --git a/source/ameba_d/bw16-typec/Example_Guides/index.rst b/source/ameba_d/bw16-typec/Example_Guides/index.rst index 168d2a6..9e75361 100644 --- a/source/ameba_d/bw16-typec/Example_Guides/index.rst +++ b/source/ameba_d/bw16-typec/Example_Guides/index.rst @@ -6,6 +6,7 @@ Example Guides Basic/index E-Paper/index + HTTP/index OTA/index Power Save/index SPI/index diff --git a/source/custom_script.py b/source/custom_script.py index 064c8b6..7acae46 100644 --- a/source/custom_script.py +++ b/source/custom_script.py @@ -9,31 +9,31 @@ board_mappings_d = { 'amb21': ['_common/ameba_d/API_Documents/Analog', '_common/ameba_d/API_Documents/AudioCodec' , '_common/ameba_d/API_Documents/BLE', '_common/ameba_d/Example_Guides/OTA', '_common/ameba_d/API_Documents/EPDIF', '_common/ameba_d/API_Documents/FatfsSDcard', '_common/ameba_d/API_Documents/FlashMemory' - , '_common/ameba_d/API_Documents/GPIO', '_common/ameba_d/Example_Guides/SPI', '_common/ameba_d/Example_Guides/Power Save', '_common/ameba_d/Example_Guides/WiFi'], + , '_common/ameba_d/API_Documents/GPIO', '_common/ameba_d/Example_Guides/SPI', '_common/ameba_d/Example_Guides/Power Save', '_common/ameba_d/Example_Guides/WiFi', '_common/ameba_d/Example_Guides/HTTP'], 'amb23': ['_common/ameba_d/API_Documents/Analog', '_common/ameba_d/API_Documents/AudioCodec' , '_common/ameba_d/API_Documents/BLE', '_common/ameba_d/Example_Guides/OTA', '_common/ameba_d/API_Documents/EPDIF', '_common/ameba_d/API_Documents/FatfsSDcard', '_common/ameba_d/API_Documents/FlashMemory' - , '_common/ameba_d/API_Documents/GPIO', '_common/ameba_d/Example_Guides/SPI', '_common/ameba_d/Example_Guides/Power Save', '_common/ameba_d/Example_Guides/WiFi'], + , '_common/ameba_d/API_Documents/GPIO', '_common/ameba_d/Example_Guides/SPI', '_common/ameba_d/Example_Guides/Power Save', '_common/ameba_d/Example_Guides/WiFi', '_common/ameba_d/Example_Guides/HTTP'], 'amb25': ['_common/ameba_d/API_Documents/Analog', '_common/ameba_d/API_Documents/AudioCodec' , '_common/ameba_d/API_Documents/BLE', '_common/ameba_d/Example_Guides/OTA', '_common/ameba_d/API_Documents/EPDIF', '_common/ameba_d/API_Documents/FatfsSDcard', '_common/ameba_d/API_Documents/FlashMemory' - , '_common/ameba_d/API_Documents/GPIO', '_common/ameba_d/Example_Guides/SPI', '_common/ameba_d/Example_Guides/Power Save', '_common/ameba_d/Example_Guides/WiFi'], + , '_common/ameba_d/API_Documents/GPIO', '_common/ameba_d/Example_Guides/SPI', '_common/ameba_d/Example_Guides/Power Save', '_common/ameba_d/Example_Guides/WiFi', '_common/ameba_d/Example_Guides/HTTP'], 'amb26': ['_common/ameba_d/API_Documents/Analog', '_common/ameba_d/API_Documents/AudioCodec' , '_common/ameba_d/API_Documents/BLE', '_common/ameba_d/Example_Guides/OTA', '_common/ameba_d/API_Documents/EPDIF', '_common/ameba_d/API_Documents/FatfsSDcard', '_common/ameba_d/API_Documents/FlashMemory' - , '_common/ameba_d/API_Documents/GPIO', '_common/ameba_d/Example_Guides/SPI', '_common/ameba_d/Example_Guides/Power Save', '_common/ameba_d/Example_Guides/WiFi'], + , '_common/ameba_d/API_Documents/GPIO', '_common/ameba_d/Example_Guides/SPI', '_common/ameba_d/Example_Guides/Power Save', '_common/ameba_d/Example_Guides/WiFi', '_common/ameba_d/Example_Guides/HTTP'], 'bw16-typeb': ['_common/ameba_d/API_Documents/Analog', '_common/ameba_d/API_Documents/AudioCodec' , '_common/ameba_d/API_Documents/BLE', '_common/ameba_d/Example_Guides/OTA', '_common/ameba_d/API_Documents/EPDIF', '_common/ameba_d/API_Documents/FatfsSDcard', '_common/ameba_d/API_Documents/FlashMemory' - , '_common/ameba_d/API_Documents/GPIO', '_common/ameba_d/Example_Guides/SPI', '_common/ameba_d/Example_Guides/Power Save', '_common/ameba_d/Example_Guides/WiFi'], + , '_common/ameba_d/API_Documents/GPIO', '_common/ameba_d/Example_Guides/SPI', '_common/ameba_d/Example_Guides/Power Save', '_common/ameba_d/Example_Guides/WiFi', '_common/ameba_d/Example_Guides/HTTP'], 'aw-cu488': ['_common/ameba_d/API_Documents/Analog', '_common/ameba_d/API_Documents/AudioCodec' , '_common/ameba_d/API_Documents/BLE', '_common/ameba_d/Example_Guides/OTA', '_common/ameba_d/API_Documents/EPDIF', '_common/ameba_d/API_Documents/FatfsSDcard', '_common/ameba_d/API_Documents/FlashMemory' - , '_common/ameba_d/API_Documents/GPIO', '_common/ameba_d/Example_Guides/SPI', '_common/ameba_d/Example_Guides/Power Save', '_common/ameba_d/Example_Guides/WiFi'], + , '_common/ameba_d/API_Documents/GPIO', '_common/ameba_d/Example_Guides/SPI', '_common/ameba_d/Example_Guides/Power Save', '_common/ameba_d/Example_Guides/WiFi', '_common/ameba_d/Example_Guides/HTTP'], 'bw16-typec': ['_common/ameba_d/API_Documents/Analog', '_common/ameba_d/API_Documents/AudioCodec' , '_common/ameba_d/API_Documents/BLE', '_common/ameba_d/Example_Guides/OTA', '_common/ameba_d/API_Documents/EPDIF', '_common/ameba_d/API_Documents/FatfsSDcard', '_common/ameba_d/API_Documents/FlashMemory' - , '_common/ameba_d/API_Documents/GPIO', '_common/ameba_d/Example_Guides/SPI', '_common/ameba_d/Example_Guides/Power Save', '_common/ameba_d/Example_Guides/WiFi'], + , '_common/ameba_d/API_Documents/GPIO', '_common/ameba_d/Example_Guides/SPI', '_common/ameba_d/Example_Guides/Power Save', '_common/ameba_d/Example_Guides/WiFi', '_common/ameba_d/Example_Guides/HTTP'], } def create_folder(folder_name):