diff --git a/_build/html/.buildinfo b/_build/html/.buildinfo
index 371e8c7..606e43e 100644
--- a/_build/html/.buildinfo
+++ b/_build/html/.buildinfo
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
-config: bd9add27c6c7b46f7f9cc7e532aef33c
+config: a17eda6b2f4cc4d1bf0c442022dd05ae
tags: 645f666f9bcd5a90fca523b33c5a78b7
diff --git a/_build/html/.doctrees/appendix.doctree b/_build/html/.doctrees/appendix.doctree
index 629087c..bb66e48 100644
--- a/_build/html/.doctrees/appendix.doctree
+++ b/_build/html/.doctrees/appendix.doctree
Binary files differ
diff --git a/_build/html/.doctrees/environment.pickle b/_build/html/.doctrees/environment.pickle
index 8205827..3275d5d 100644
--- a/_build/html/.doctrees/environment.pickle
+++ b/_build/html/.doctrees/environment.pickle
Binary files differ
diff --git a/_build/html/.doctrees/intro.doctree b/_build/html/.doctrees/intro.doctree
index f3b903c..9c5c7c5 100644
--- a/_build/html/.doctrees/intro.doctree
+++ b/_build/html/.doctrees/intro.doctree
Binary files differ
diff --git a/_build/html/.doctrees/week1.doctree b/_build/html/.doctrees/week1.doctree
index bb049ae..3b86385 100644
--- a/_build/html/.doctrees/week1.doctree
+++ b/_build/html/.doctrees/week1.doctree
Binary files differ
diff --git a/_build/html/_sources/appendix.rst.txt b/_build/html/_sources/appendix.rst.txt
index c97cc29..2f85b7d 100644
--- a/_build/html/_sources/appendix.rst.txt
+++ b/_build/html/_sources/appendix.rst.txt
@@ -54,3 +54,15 @@
:linenos:
:emphasize-lines: 8-19
+LINE Notify (HTTPS POST)
+---------------------------------------------
+
+https://notify-bot.line.me/ja/ で、トークンを取得しておく必要があります。
+
+
+.. literalinclude:: src/line01.ino
+ :caption:
+ :name: line01
+ :language: arduino
+ :linenos:
+ :emphasize-lines: 25-29
diff --git a/_build/html/_sources/intro.rst.txt b/_build/html/_sources/intro.rst.txt
index a5c2615..7b65096 100644
--- a/_build/html/_sources/intro.rst.txt
+++ b/_build/html/_sources/intro.rst.txt
@@ -49,4 +49,5 @@
- M5StickC非公式日本語リファレンス https://lang-ship.com/reference/unofficial/M5StickC
- スイッチサイエンス M5StickC Plus https://www.switch-science.com/catalog/6470
-- M5StickCガイド https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/docs/M5StickC_Guide_Japanese.pdf
\ No newline at end of file
+- M5StickCガイド https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/docs/M5StickC_Guide_Japanese.pdf
+- arduino-cli https://github.com/arduino/arduino-cli コマンドラインでビルド&書き込みできるツール。最初はGUI版の Arduino IDE をおすすめしますが、慣れてきたら入れてみてもよいかも。MacOSなら brew install で簡単に導入できます。
\ No newline at end of file
diff --git a/_build/html/_sources/week1.rst.txt b/_build/html/_sources/week1.rst.txt
index 968e5fc..dd7bfe2 100644
--- a/_build/html/_sources/week1.rst.txt
+++ b/_build/html/_sources/week1.rst.txt
@@ -1,7 +1,8 @@
.. |br| raw:: html
-
+
+
1週目
========================
@@ -375,7 +376,11 @@
:linenos:
.. :emphasize-lines: 5
-.. warning:: https (SSL) 通信をする場合は、スケッチ例→HTTPClient→BasicHttpsClient を参照して、WiFiClientSecure クラスを使用してください。
+.. role:: strike
+
+
+.. warning:: https (SSL) 通信でPOSTメソッドで送信する場合は、付録→LINE Notify (:numref:`line01`)を参考にしてください。以前は「スケッチ例→HTTPClient→BasicHttpsClient を参照して、WiFiClientSecure クラスを使用してください。」と書いていましたが、WifiClientSecureは必要ありません。
+
Google Spreadsheet にデータを送信する
--------------------------------------------------------
@@ -400,7 +405,7 @@
:linenos:
:emphasize-lines: 14,18
-.. warning:: doGet関数の返却値は、本来はHTTPのレスポンスとして受け取れるのですが、現状の ``HTTPClient`` ではリダイレクトをうまく処理できないため、Google App Scriptの出力を受け取れない可能性があります。
+.. warning:: doGet関数の返却値は、本来はHTTPのレスポンスとして受け取れるのですが、現状の ``HTTPClient`` ではリダイレクトをうまく処理できない?ため、Google App Scriptの出力を受け取れない可能性があります。
WebServer
----------------------------------------
diff --git a/_build/html/appendix.html b/_build/html/appendix.html
index a431df9..0ba68cd 100644
--- a/_build/html/appendix.html
+++ b/_build/html/appendix.html
@@ -14,6 +14,7 @@
+
@@ -101,6 +102,7 @@
https://notify-bot.line.me/ja/ で、トークンを取得しておく必要があります。
+1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 | #include <WiFi.h>
+#include <WiFiMulti.h>
+#include <WiFiClient.h>
+#include <HTTPClient.h>
+
+WiFiMulti WiFiMulti;
+
+void setup() {
+ Serial.begin(115200);
+ WiFi.mode(WIFI_STA);
+ WiFiMulti.addAP("miura_asp_2g", "********");
+
+ // wait for WiFi connection
+ Serial.print("Waiting for WiFi to connect...");
+ while ((WiFiMulti.run() != WL_CONNECTED)) {
+ Serial.print(".");
+ delay(50);
+ }
+ Serial.println(" connected");
+}
+
+void loop() {
+ HTTPClient http;
+
+ if (http.begin("https://notify-api.line.me/api/notify")) { // HTTPS
+ http.addHeader("Authorization", "Bearer TOKENTOKENTOKEN"); // ここのTOKENTOKEN... の部分に、取得したTokenを指定する
+ http.addHeader("Content-Type", "application/x-www-form-urlencoded"); // format of postdata
+ String postdata = "message=日本語でも大丈夫です";
+ int httpCode = http.POST(postdata);
+
+ // httpCode will be negative on error
+ if (httpCode > 0) {
+ // HTTP header has been send and Server response header has been handled
+ Serial.printf("[HTTP] GET... code: %d\n", httpCode);
+
+ // file found at server
+ if (httpCode == HTTP_CODE_OK || httpCode == HTTP_CODE_MOVED_PERMANENTLY) {
+ String payload = http.getString();
+ Serial.println(payload);
+ }
+ } else {
+ Serial.printf("[HTTP] GET... failed, error: %s\n", http.errorToString(httpCode).c_str());
+ }
+ http.end();
+ } else {
+ Serial.printf("[HTTP] Unable to connect\n");
+ }
+
+ Serial.println();
+ Serial.println("Waiting 2 minutes...");
+ delay(60*2*1000); // 120秒まつ
+}
+ |