diff --git a/_build/doctrees/arduino.doctree b/_build/doctrees/arduino.doctree index 1c26b06..f3d046b 100644 --- a/_build/doctrees/arduino.doctree +++ b/_build/doctrees/arduino.doctree Binary files differ diff --git a/_build/doctrees/conclusion.doctree b/_build/doctrees/conclusion.doctree index 808a991..1ff8460 100644 --- a/_build/doctrees/conclusion.doctree +++ b/_build/doctrees/conclusion.doctree Binary files differ diff --git a/_build/doctrees/environment.pickle b/_build/doctrees/environment.pickle index 2c73d8e..f379051 100644 --- a/_build/doctrees/environment.pickle +++ b/_build/doctrees/environment.pickle Binary files differ diff --git a/_build/doctrees/index.doctree b/_build/doctrees/index.doctree index 3d66172..b1b404d 100644 --- a/_build/doctrees/index.doctree +++ b/_build/doctrees/index.doctree Binary files differ diff --git a/_build/doctrees/intro.doctree b/_build/doctrees/intro.doctree index 0c146a8..1d24546 100644 --- a/_build/doctrees/intro.doctree +++ b/_build/doctrees/intro.doctree Binary files differ diff --git a/_build/doctrees/tutorial.doctree b/_build/doctrees/tutorial.doctree index 556cf9b..b5d709b 100644 --- a/_build/doctrees/tutorial.doctree +++ b/_build/doctrees/tutorial.doctree Binary files differ diff --git a/_build/html/.buildinfo b/_build/html/.buildinfo index 75c3eb8..371e8c7 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: fc0dba702e525f564abcc0617f831f1a +config: bd9add27c6c7b46f7f9cc7e532aef33c tags: 645f666f9bcd5a90fca523b33c5a78b7 diff --git a/_build/html/.doctrees/00_pre.doctree b/_build/html/.doctrees/00_pre.doctree new file mode 100644 index 0000000..39aaed2 --- /dev/null +++ b/_build/html/.doctrees/00_pre.doctree Binary files differ diff --git a/_build/html/.doctrees/01_week.doctree b/_build/html/.doctrees/01_week.doctree new file mode 100644 index 0000000..23bea06 --- /dev/null +++ b/_build/html/.doctrees/01_week.doctree Binary files differ diff --git a/_build/html/.doctrees/02_week.doctree b/_build/html/.doctrees/02_week.doctree new file mode 100644 index 0000000..ee00ab5 --- /dev/null +++ b/_build/html/.doctrees/02_week.doctree Binary files differ diff --git a/_build/html/.doctrees/arduino.doctree b/_build/html/.doctrees/arduino.doctree index a2d551b..822fe14 100644 --- a/_build/html/.doctrees/arduino.doctree +++ b/_build/html/.doctrees/arduino.doctree Binary files differ diff --git a/_build/html/.doctrees/conclusion.doctree b/_build/html/.doctrees/conclusion.doctree index 3889205..2cb77e8 100644 --- a/_build/html/.doctrees/conclusion.doctree +++ b/_build/html/.doctrees/conclusion.doctree Binary files differ diff --git a/_build/html/.doctrees/environment.pickle b/_build/html/.doctrees/environment.pickle index df8ac71..1f1769c 100644 --- a/_build/html/.doctrees/environment.pickle +++ b/_build/html/.doctrees/environment.pickle Binary files differ diff --git a/_build/html/.doctrees/index.doctree b/_build/html/.doctrees/index.doctree index 74e206a..bd84052 100644 --- a/_build/html/.doctrees/index.doctree +++ b/_build/html/.doctrees/index.doctree Binary files differ diff --git a/_build/html/.doctrees/intro.doctree b/_build/html/.doctrees/intro.doctree index b24d9e0..eb1815d 100644 --- a/_build/html/.doctrees/intro.doctree +++ b/_build/html/.doctrees/intro.doctree Binary files differ diff --git a/_build/html/.doctrees/pre.doctree b/_build/html/.doctrees/pre.doctree new file mode 100644 index 0000000..c9304b6 --- /dev/null +++ b/_build/html/.doctrees/pre.doctree Binary files differ diff --git a/_build/html/.doctrees/tutorial.doctree b/_build/html/.doctrees/tutorial.doctree index c1a4415..1aeae58 100644 --- a/_build/html/.doctrees/tutorial.doctree +++ b/_build/html/.doctrees/tutorial.doctree Binary files differ diff --git a/_build/html/.doctrees/week1.doctree b/_build/html/.doctrees/week1.doctree new file mode 100644 index 0000000..f74b8ff --- /dev/null +++ b/_build/html/.doctrees/week1.doctree Binary files differ diff --git a/_build/html/.doctrees/week2.doctree b/_build/html/.doctrees/week2.doctree new file mode 100644 index 0000000..a160060 --- /dev/null +++ b/_build/html/.doctrees/week2.doctree Binary files differ diff --git a/_build/html/00_pre.html b/_build/html/00_pre.html new file mode 100644 index 0000000..39e8151 --- /dev/null +++ b/_build/html/00_pre.html @@ -0,0 +1,227 @@ + + + + + + + + + + 事前学習・準備 — IoT Programming ドキュメント + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + + + +
+ +
+ + + + + + + + + + + + + + + + + + + +
+ + + + +
+
+
+
+ +
+

事前学習・準備

+

ほげほげ

+
+ + +
+ +
+ +
+
+ +
+ +
+ + + + + + + + + + + \ No newline at end of file diff --git a/_build/html/01_week.html b/_build/html/01_week.html new file mode 100644 index 0000000..373bc17 --- /dev/null +++ b/_build/html/01_week.html @@ -0,0 +1,226 @@ + + + + + + + + + + 1週目 — IoT Programming ドキュメント + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + + + +
+ +
+ + + + + + + + + + + + + + + + + + + +
+ + + + +
+
+
+
+ +
+

1週目

+
+ + +
+ +
+ +
+
+ +
+ +
+ + + + + + + + + + + \ No newline at end of file diff --git a/_build/html/02_week.html b/_build/html/02_week.html new file mode 100644 index 0000000..0410c57 --- /dev/null +++ b/_build/html/02_week.html @@ -0,0 +1,226 @@ + + + + + + + + + + 2週目 — IoT Programming ドキュメント + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + + + +
+ +
+ + + + + + + + + + + + + + + + + + + +
+ + + + +
+
+
+
+ +
+

2週目

+
+ + +
+ +
+ +
+
+ +
+ +
+ + + + + + + + + + + \ No newline at end of file diff --git a/_build/html/_images/board_manager_esp32.png b/_build/html/_images/board_manager_esp32.png new file mode 100644 index 0000000..1091969 --- /dev/null +++ b/_build/html/_images/board_manager_esp32.png Binary files differ diff --git a/_build/html/_images/build_factorytest.png b/_build/html/_images/build_factorytest.png new file mode 100644 index 0000000..4f1282c --- /dev/null +++ b/_build/html/_images/build_factorytest.png Binary files differ diff --git a/_build/html/_images/library_manager_m5stickcplus.png b/_build/html/_images/library_manager_m5stickcplus.png new file mode 100644 index 0000000..135593f --- /dev/null +++ b/_build/html/_images/library_manager_m5stickcplus.png Binary files differ diff --git a/_build/html/_images/menu_file_sketchexample_m5stick_factory.png b/_build/html/_images/menu_file_sketchexample_m5stick_factory.png new file mode 100644 index 0000000..c4d720e --- /dev/null +++ b/_build/html/_images/menu_file_sketchexample_m5stick_factory.png Binary files differ diff --git a/_build/html/_images/menu_tool_board_esp32_m5stickc.png b/_build/html/_images/menu_tool_board_esp32_m5stickc.png new file mode 100644 index 0000000..d2a91c9 --- /dev/null +++ b/_build/html/_images/menu_tool_board_esp32_m5stickc.png Binary files differ diff --git a/_build/html/_images/select_serialport.png b/_build/html/_images/select_serialport.png new file mode 100644 index 0000000..70eb4c3 --- /dev/null +++ b/_build/html/_images/select_serialport.png Binary files differ diff --git a/_build/html/_sources/00_pre.rst.txt b/_build/html/_sources/00_pre.rst.txt new file mode 100644 index 0000000..23ddde0 --- /dev/null +++ b/_build/html/_sources/00_pre.rst.txt @@ -0,0 +1,6 @@ +.. _00_pre: + +事前学習・準備 +======================== + +ほげほげ diff --git a/_build/html/_sources/01_week.rst.txt b/_build/html/_sources/01_week.rst.txt new file mode 100644 index 0000000..548dfbd --- /dev/null +++ b/_build/html/_sources/01_week.rst.txt @@ -0,0 +1,2 @@ +1週目 +======================== diff --git a/_build/html/_sources/02_week.rst.txt b/_build/html/_sources/02_week.rst.txt new file mode 100644 index 0000000..648b0d6 --- /dev/null +++ b/_build/html/_sources/02_week.rst.txt @@ -0,0 +1,2 @@ +2週目 +======================== diff --git a/_build/html/_sources/arduino.rst.txt b/_build/html/_sources/arduino.rst.txt index 40377c9..42937f8 100644 --- a/_build/html/_sources/arduino.rst.txt +++ b/_build/html/_sources/arduino.rst.txt @@ -1,3 +1,5 @@ +:orphan: + .. _arduino: Arduino @@ -31,3 +33,11 @@ これらのソースコードは、ファイルから直接差し込むほうが、間違いは少ないと思われます。 + + +.. literalinclude:: src/analogread.ino + :caption: + :name: analogread + :language: arduino + :emphasize-lines: 2 + :linenos: diff --git a/_build/html/_sources/conclusion.rst.txt b/_build/html/_sources/conclusion.rst.txt index 1be923c..a1106ad 100644 --- a/_build/html/_sources/conclusion.rst.txt +++ b/_build/html/_sources/conclusion.rst.txt @@ -1,3 +1,5 @@ +:orphan: + .. _conclusion: Conclusion diff --git a/_build/html/_sources/index.rst.txt b/_build/html/_sources/index.rst.txt index 6c4cb08..aeef49d 100644 --- a/_build/html/_sources/index.rst.txt +++ b/_build/html/_sources/index.rst.txt @@ -3,7 +3,11 @@ You can adapt this file completely to your liking, but it should at least contain the root `toctree` directive. -Welcome to TestRTP's documentation! +.. .. |br| raw:: html +..
+ + +IoTプログラミング =================================== .. toctree:: @@ -11,8 +15,11 @@ :caption: Contents: intro - arduino - tutorial + pre + week1 + week2 +.. arduino +.. tutorial conclusion diff --git a/_build/html/_sources/intro.rst.txt b/_build/html/_sources/intro.rst.txt index 4be01d5..469149c 100644 --- a/_build/html/_sources/intro.rst.txt +++ b/_build/html/_sources/intro.rst.txt @@ -1,59 +1,43 @@ -イントロダクション -=================================== - -ここはIntroです。:ref:`isprime` に、ソースコードの例を示します。 - -.. code-block:: c - - #include - - int isprime(int n){ - int i; - for(i=2;i に、プログラムを書き込むためには、 +開発環境(Arduino)のインストールと、設定が必要になります。 + +.. note:: M5StickC Plusは、2017年に発売されたM5StickC の後継版です。ディスプレイサイズと解像度、バッテリ容量が向上しています。また、ブザーも追加されているため、簡単な音を本体のみで鳴らすことができます。 + +.. note:: UIFlowという、Webベースのブロックプログラミング環境もありますが、本実験では柔軟性と拡張性を重視し、Arduinoを使用します。ArduinoではC言語でプログラムを記述します。 + +開発環境(Arduino IDE)のインストール +------------------------------------------- + +Arduino IDEは、Arduinoというマイコンボード用に開発され、長年使われている開発環境です。IDEとは、Integrated Development Environment の略で、日本語では統合開発環境と呼びます。有名なIDEには、Microsoft Visual Studio [#vs]_ や Eclipse [#eclipse]_ があります。 + +.. [#vs] おもにWindows向けの開発環境です。ちなみに、Visual Studio Code は、最近利用者が増加しているコードエディタです。 +.. [#eclipse] おもにJava向けの開発環境です。「イクリプス」と発音します。 + +.. note:: `初心者向けM5Stackの始め方(ArduinoIDE編) `_ も参考になります。**ただし、M5Stackではなく、M5StickC/CPlus特有の注意点があります。** + +.. _ideinstwin: + +Windowsの場合 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +1. Microsoft Store で、`Arduino IDE `_ を検索してインストールする。 +#. M5StickCPlusをUSB接続するために、`FTDI Virtual COM Port (VCP) Driver Setup File `_ をダウンロードしてインストールする。ちなみに、他のOS用のドライバやバージョンはこちら: + +MacOS、Linuxの場合 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +1. Arduino IDEのダウンロードサイト から、自分のOSに適合したファイルをダウンロードする。 +#. インストールする。 + +Arduino IDEと、USB接続用のドライバ(Windowsのみ)をインストールしたら、次のステップ(Arduino IDEの設定)にすすみます。次のステップでは、Arduino IDEで、ESP32用のプログラムをコンパイルしたり、M5StickCPlusのサンプルプログラムを利用したりするために、ボードとライブラリをインストールします。 + + + +Arduino IDEの設定 +--------------------------------------- + +追加のボードマネージャーのURLを設定する +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + +1. Arduino IDEを起動する。 +#. 「ファイル」→「環境設定」→「追加のボードマネージャーのURL」に、 ``https://dl.espressif.com/dl/package_esp32_index.json`` を設定する。以下のテキストエリアの右上の四角アイコンを押すと、URLをコピーできます。:: + + https://dl.espressif.com/dl/package_esp32_index.json + +esp32のボードを追加する +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +「ツール」→「ボード…」→「ボードマネージャ…」をひらき、右上のテキスト入力フィールドに、``esp32`` と入力して絞り込み、「インストール」を押す(:numref:`fig_board_manager_esp32` )。 + +.. _fig_board_manager_esp32: + +.. figure:: images/board_manager_esp32.png + :scale: 60% + :alt: ボードマネージャにて``esp32``で絞り込んでいる画面 + :name: f_board_manager_esp32 + + ボードマネージャにて``esp32``で絞り込んでいる画面 + + +M5StickCPlusライブラリをインストールする +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +「スケッチ」→「ライブラリをインクルード」→「ライブラリを管理…」で、ライブラリマネージャをひらく。 + +右上のテキスト入力フィールドに、``m5stickcplus`` と入力して絞り込み、M5StickCPlus の 「インストール」を押す(:numref:`fig_library_manager_m5stickcplus`)。 + +.. _fig_library_manager_m5stickcplus: + +.. figure:: images/library_manager_m5stickcplus.png + :scale: 60% + :alt: ライブラリマネージャにて``m5stickcplus``で絞り込んでいる画面 + :name: f_library_manager_m5stickcplus + + ライブラリマネージャにて``m5stickcplus``で絞り込んでいる画面 + +M5StickCPlusライブラリの確認と、サンプルソースコードの表示 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:numref:`fig_menu_file_sketchexample_m5stick_factory` に示すように、「ファイル」→「スケッチ例」→「互換性なし」→「M5StickCPlus」→「FactoryTest」をえらぶ。 + +.. _fig_menu_file_sketchexample_m5stick_factory: + +.. figure:: images/menu_file_sketchexample_m5stick_factory.png + :scale: 80% + :alt: 「ファイル」→「スケッチ例」→「互換性なし」→「M5StickCPlus」→「FactoryTest」 + :name: f_menu_file_sketchexample_m5stick_factory + + 「ファイル」→「スケッチ例」→「互換性なし」→「M5StickCPlus」→「FactoryTest」 + + +ボードの選択 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:numref:`fig_menu_tool_board_esp32_m5stickc` に示すように、「ツール」→「ボード: Arduino Uno」→「ESP32 Arduino」→「M5Stick-C」をえらぶ。 + +.. _fig_menu_tool_board_esp32_m5stickc: + +.. figure:: images/menu_tool_board_esp32_m5stickc.png + :scale: 80% + :alt: 「ツール」→「ボード: Arduino Uno」→「ESP32 Arduino」→「M5Stick-C」 + :name: f_menu_tool_board_esp32_m5stickc + + 「ツール」→「ボード: Arduino Uno」→「ESP32 Arduino」→「M5Stick-C」 + + +ビルド +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:numref:`fig_build_factorytest` に示すように、✔️表記された丸ボタン(一番左)をおして、ビルド(ソースコードのコンパイルとリンク)をする。 + +.. _fig_build_factorytest: + +.. figure:: images/build_factorytest.png + :scale: 80% + :alt: ビルド + :name: f_build_factorytest + + ビルド + + +.. warning:: **M5StickCPlus本体がない事前準備の段階で、できるのは、ここまでです。** 以降は、本体をUSB接続したあとで、行う作業になります。 + + +シリアルポートの選択 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +**本体をUSB接続したあと** で、 :numref:`fig_select_serialport` に示すように、「ツール」→「シリアルポート」で、書き込むデバイスが接続されているシリアルポートを選択する。Windowsの場合は、COM3のように、``COM + 数字`` で表記される。Macの場合は、``/dev/cu.usbserial-XXXXX`` のように表記される。 + +.. _fig_select_serialport: + +.. figure:: images/select_serialport.png + :scale: 80% + :alt: シリアルポートの選択 + :name: f_select_serialport + + シリアルポートの選択 + +.. note:: Windowsを使っていて、シリアルポートが表示されないときは、:ref:`ideinstwin` で指示した、FTDI Virtual COM Port Driver がインストールされているか、確認してみてください。本体を挿したときに、PCの「デバイスマネージャ」 (スタートメニューのdevice managerで検索)で、「ポート(COMとLPT)」に表示されていれば、ドライバはインストールされていますので、Arduino IDEを再起動してください。 + + +.. _writetom5: + +プログラムの書き込み +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +「→」のアイコンボタンをおすと、プログラムの書き込みを開始します。 + +.. warning:: 書き込みに失敗するときは、環境設定で、「より詳細な情報を表示する」にチェックをいれてみてください。原因がすこしわかりやすくなります。 diff --git a/_build/html/_sources/tutorial.rst.txt b/_build/html/_sources/tutorial.rst.txt index b0ff9fb..998f9ae 100644 --- a/_build/html/_sources/tutorial.rst.txt +++ b/_build/html/_sources/tutorial.rst.txt @@ -1,169 +1,171 @@ -Tutorial -=================================== - -ここはチュートリアルです。 - -.. image:: images/ipconfig.png - - -.. _fig_ipconfig: - -.. figure:: images/ipconfig.png - :scale: 50% - :alt: This is ipconfig img - :name: f_ipconfig - - ipconfigによるIPアドレスの表示 - (クリックすると拡大します) - - -https://ss.istlab.info/ が、講義システムになります。 - -:ref:`fig_ipconfig` に、ipconfigによるIPアドレスの表示を示します。 - -.. note:: 図への参照は、同一ファイル内からしかできない?? - -図表番号は、``pip3 install sphinx-numfig`` をすれば、つくようです。 - -図表番号を参照するときは、:numref:`f_ipconfig` のように、numref をつかいます。参考サイト:https://sphinx-users.jp/reverse-dict/images/numbering.html - -:numref:`fig_ipconfig` だと、番号がつく? →結果として、ついた。 - -:numref:`fig_ipconfig` :ref:`fig_ipconfig` のようにすれば、番号とキャプションが両方はいります。 - - - - -===================================================== - The reStructuredText_ Cheat Sheet: Syntax Reminders -===================================================== -:Info: See for introductory docs. -:Author: David Goodger -:Date: $Date: 2013-02-20 02:10:53 +0100 (Mi, 20. Feb 2013) $ -:Revision: $Revision: 7612 $ -:Description: This is a "docinfo block", or bibliographic field list - -.. NOTE:: If you are reading this as HTML, please read - ``_ instead to see the input syntax examples! - -Section Structure -================= -Section titles are underlined or overlined & underlined. - -Body Elements -============= -Grid table: - -+--------------------------------+-----------------------------------+ -| Paragraphs are flush-left, | Literal block, preceded by "::":: | -| separated by blank lines. | | -| | Indented | -| Block quotes are indented. | | -+--------------------------------+ or:: | -| >>> print 'Doctest block' | | -| Doctest block | > Quoted | -+--------------------------------+-----------------------------------+ -| | Line blocks preserve line breaks & indents. [new in 0.3.6] | -| | Useful for addresses, verse, and adornment-free lists; long | -| lines can be wrapped with continuation lines. | -+--------------------------------------------------------------------+ - -Simple tables: - -================ ============================================================ -List Type Examples (syntax in the `text source `_) -================ ============================================================ -Bullet list * items begin with "-", "+", or "*" -Enumerated list 1. items use any variation of "1.", "A)", and "(i)" - #. also auto-enumerated -Definition list Term is flush-left : optional classifier - Definition is indented, no blank line between -Field list :field name: field body -Option list -o at least 2 spaces between option & description -================ ============================================================ - -================ ============================================================ -Explicit Markup Examples (visible in the `text source`_) -================ ============================================================ -Footnote .. [1] Manually numbered or [#] auto-numbered - (even [#labelled]) or [*] auto-symbol -Citation .. [CIT2002] A citation. -Hyperlink Target .. _reStructuredText: http://docutils.sf.net/rst.html - .. _indirect target: reStructuredText_ - .. _internal target: -Anonymous Target __ http://docutils.sf.net/docs/ref/rst/restructuredtext.html -Directive ("::") .. image:: images/biohazard.png -Substitution Def .. |substitution| replace:: like an inline directive -Comment .. is anything else -Empty Comment (".." on a line by itself, with blank lines before & after, - used to separate indentation contexts) -================ ============================================================ - -Inline Markup -============= -*emphasis*; **strong emphasis**; `interpreted text`; `interpreted text -with role`:emphasis:; ``inline literal text``; standalone hyperlink, -http://docutils.sourceforge.net; named reference, reStructuredText_; -`anonymous reference`__; footnote reference, [1]_; citation reference, -[CIT2002]_; |substitution|; _`inline internal target`. - -Directive Quick Reference -========================= -See for full info. - -================ ============================================================ -Directive Name Description (Docutils version added to, in [brackets]) -================ ============================================================ -attention Specific admonition; also "caution", "danger", - "error", "hint", "important", "note", "tip", "warning" -admonition Generic titled admonition: ``.. admonition:: By The Way`` -image ``.. image:: picture.png``; many options possible -figure Like "image", but with optional caption and legend -topic ``.. topic:: Title``; like a mini section -sidebar ``.. sidebar:: Title``; like a mini parallel document -parsed-literal A literal block with parsed inline markup -rubric ``.. rubric:: Informal Heading`` -epigraph Block quote with class="epigraph" -highlights Block quote with class="highlights" -pull-quote Block quote with class="pull-quote" -compound Compound paragraphs [0.3.6] -container Generic block-level container element [0.3.10] -table Create a titled table [0.3.1] -list-table Create a table from a uniform two-level bullet list [0.3.8] -csv-table Create a table from CSV data [0.3.4] -contents Generate a table of contents -sectnum Automatically number sections, subsections, etc. -header, footer Create document decorations [0.3.8] -target-notes Create an explicit footnote for each external target -math Mathematical notation (input in LaTeX format) -meta HTML-specific metadata -include Read an external reST file as if it were inline -raw Non-reST data passed untouched to the Writer -replace Replacement text for substitution definitions -unicode Unicode character code conversion for substitution defs -date Generates today's date; for substitution defs -class Set a "class" attribute on the next element -role Create a custom interpreted text role [0.3.2] -default-role Set the default interpreted text role [0.3.10] -title Set the metadata document title [0.3.10] -================ ============================================================ - -Interpreted Text Role Quick Reference -===================================== -See for full info. - -================ ============================================================ -Role Name Description -================ ============================================================ -emphasis Equivalent to *emphasis* -literal Equivalent to ``literal`` but processes backslash escapes -math Mathematical notation (input in LaTeX format) -PEP Reference to a numbered Python Enhancement Proposal -RFC Reference to a numbered Internet Request For Comments -raw For non-reST data; cannot be used directly (see docs) [0.3.6] -strong Equivalent to **strong** -sub Subscript -sup Superscript -title Title reference (book, etc.); standard default role -================ ============================================================ - +:orphan: + +Tutorial +=================================== + +ここはチュートリアルです。ほげほげほげ。自動コンパイルテスト。さらにテスト。 + +.. image:: images/ipconfig.png + + +.. _fig_ipconfig: + +.. figure:: images/ipconfig.png + :scale: 50% + :alt: This is ipconfig img + :name: f_ipconfig + + ipconfigによるIPアドレスの表示 + (クリックすると拡大します) + + +https://ss.istlab.info/ が、講義システムになります。 + +:ref:`fig_ipconfig` に、ipconfigによるIPアドレスの表示を示します。 + +.. note:: 図への参照は、同一ファイル内からしかできない?? + +図表番号は、``pip3 install sphinx-numfig`` をすれば、つくようです。 + +図表番号を参照するときは、:numref:`f_ipconfig` のように、numref をつかいます。参考サイト:https://sphinx-users.jp/reverse-dict/images/numbering.html + +:numref:`fig_ipconfig` だと、番号がつく? →結果として、ついた。 + +:numref:`fig_ipconfig` :ref:`fig_ipconfig` のようにすれば、番号とキャプションが両方はいります。 + + + + +===================================================== + The reStructuredText_ Cheat Sheet: Syntax Reminders +===================================================== +:Info: See for introductory docs. +:Author: David Goodger +:Date: $Date: 2013-02-20 02:10:53 +0100 (Mi, 20. Feb 2013) $ +:Revision: $Revision: 7612 $ +:Description: This is a "docinfo block", or bibliographic field list + +.. NOTE:: If you are reading this as HTML, please read + ``_ instead to see the input syntax examples! + +Section Structure +================= +Section titles are underlined or overlined & underlined. + +Body Elements +============= +Grid table: + ++--------------------------------+-----------------------------------+ +| Paragraphs are flush-left, | Literal block, preceded by "::":: | +| separated by blank lines. | | +| | Indented | +| Block quotes are indented. | | ++--------------------------------+ or:: | +| >>> print 'Doctest block' | | +| Doctest block | > Quoted | ++--------------------------------+-----------------------------------+ +| | Line blocks preserve line breaks & indents. [new in 0.3.6] | +| | Useful for addresses, verse, and adornment-free lists; long | +| lines can be wrapped with continuation lines. | ++--------------------------------------------------------------------+ + +Simple tables: + +================ ============================================================ +List Type Examples (syntax in the `text source `_) +================ ============================================================ +Bullet list * items begin with "-", "+", or "*" +Enumerated list 1. items use any variation of "1.", "A)", and "(i)" + #. also auto-enumerated +Definition list Term is flush-left : optional classifier + Definition is indented, no blank line between +Field list :field name: field body +Option list -o at least 2 spaces between option & description +================ ============================================================ + +================ ============================================================ +Explicit Markup Examples (visible in the `text source`_) +================ ============================================================ +Footnote .. [1] Manually numbered or [#] auto-numbered + (even [#labelled]) or [*] auto-symbol +Citation .. [CIT2002] A citation. +Hyperlink Target .. _reStructuredText: http://docutils.sf.net/rst.html + .. _indirect target: reStructuredText_ + .. _internal target: +Anonymous Target __ http://docutils.sf.net/docs/ref/rst/restructuredtext.html +Directive ("::") .. image:: images/biohazard.png +Substitution Def .. |substitution| replace:: like an inline directive +Comment .. is anything else +Empty Comment (".." on a line by itself, with blank lines before & after, + used to separate indentation contexts) +================ ============================================================ + +Inline Markup +============= +*emphasis*; **strong emphasis**; `interpreted text`; `interpreted text +with role`:emphasis:; ``inline literal text``; standalone hyperlink, +http://docutils.sourceforge.net; named reference, reStructuredText_; +`anonymous reference`__; footnote reference, [1]_; citation reference, +[CIT2002]_; |substitution|; _`inline internal target`. + +Directive Quick Reference +========================= +See for full info. + +================ ============================================================ +Directive Name Description (Docutils version added to, in [brackets]) +================ ============================================================ +attention Specific admonition; also "caution", "danger", + "error", "hint", "important", "note", "tip", "warning" +admonition Generic titled admonition: ``.. admonition:: By The Way`` +image ``.. image:: picture.png``; many options possible +figure Like "image", but with optional caption and legend +topic ``.. topic:: Title``; like a mini section +sidebar ``.. sidebar:: Title``; like a mini parallel document +parsed-literal A literal block with parsed inline markup +rubric ``.. rubric:: Informal Heading`` +epigraph Block quote with class="epigraph" +highlights Block quote with class="highlights" +pull-quote Block quote with class="pull-quote" +compound Compound paragraphs [0.3.6] +container Generic block-level container element [0.3.10] +table Create a titled table [0.3.1] +list-table Create a table from a uniform two-level bullet list [0.3.8] +csv-table Create a table from CSV data [0.3.4] +contents Generate a table of contents +sectnum Automatically number sections, subsections, etc. +header, footer Create document decorations [0.3.8] +target-notes Create an explicit footnote for each external target +math Mathematical notation (input in LaTeX format) +meta HTML-specific metadata +include Read an external reST file as if it were inline +raw Non-reST data passed untouched to the Writer +replace Replacement text for substitution definitions +unicode Unicode character code conversion for substitution defs +date Generates today's date; for substitution defs +class Set a "class" attribute on the next element +role Create a custom interpreted text role [0.3.2] +default-role Set the default interpreted text role [0.3.10] +title Set the metadata document title [0.3.10] +================ ============================================================ + +Interpreted Text Role Quick Reference +===================================== +See for full info. + +================ ============================================================ +Role Name Description +================ ============================================================ +emphasis Equivalent to *emphasis* +literal Equivalent to ``literal`` but processes backslash escapes +math Mathematical notation (input in LaTeX format) +PEP Reference to a numbered Python Enhancement Proposal +RFC Reference to a numbered Internet Request For Comments +raw For non-reST data; cannot be used directly (see docs) [0.3.6] +strong Equivalent to **strong** +sub Subscript +sup Superscript +title Title reference (book, etc.); standard default role +================ ============================================================ + diff --git a/_build/html/_sources/week1.rst.txt b/_build/html/_sources/week1.rst.txt new file mode 100644 index 0000000..7839d7b --- /dev/null +++ b/_build/html/_sources/week1.rst.txt @@ -0,0 +1,134 @@ +1週目 +======================== + +.. note:: 以下の項目について、全員がすべてを試す必要はありません。役割分担をして、確認と理解をすすめてください。 + +電源の切り方 +---------------------------------------- + + +プログラムの書き込み方 +-------------------------------------- + +:ref:`writetom5` を参照してください。 + + +コードを書くときの注意 +--------------------------------------- + +- #include を #include にしないと、画面がおかしくなる +- 大文字小文字に注意 +- 画面をつかうプログラムを書き込んだあと、画面を使わないプログラムを書き込むと、前のプログラムの画面が残ることがある。 + +Serialモニタ +--------------------------------------- + + +文字列の扱い +---------------------------------------- + + +LED +---------------------------------------- + + +外部のLEDを接続 +----------------------------------------- + +PWM (Pulse Width Modulation) + + +外部のセンサを接続 +----------------------------------------- + +CdSセル 明度センサ + +人感センサ + +圧力センサ + +曲げセンサ + + +加速度センサ +----------------------------------------- + + +赤外(InfraRed)リモコン +------------------------------------------ + +読み取り + +信号発信 + +内蔵赤外LED + + +本体の液晶ディスプレイ(LCD) +------------------------------------------- + +- M5StickCのDisplay周り解析 + +本体のボタン +------------------------------------------ + +スプライト +------------------------------------- +画面のちらつき防止 + + +ブザー +------------------------------------- + +サーボモータ +-------------------------------------- + + + +Wifi 接続 +-------------------------------------- + + +NTPサーバ (Network Time Protocol) と時刻の取得 +----------------------------------------------------------------------------------------------------------------------------------- + + + +WebClient +--------------------------------------- + + +WebServer +---------------------------------------- + + +Bluetooth Low Energy +-------------------------------------- + +アドバータイズ + + +Bluetooth Serial Protocol Profile (SPP) +-------------------------------------------- + + +Preference +------------------------------------------- + + +電力制御 +----------------------------------- + + +その他 +------------------------------------- +- CO2 (CCS811) +- RCS-620S (Felica) +- JJYClock +- RTC(BM8563) +- OTA + +参考リンク +------------------------------------------ + +- M5StickC非公式日本語リファレンス \ No newline at end of file diff --git a/_build/html/_sources/week2.rst.txt b/_build/html/_sources/week2.rst.txt new file mode 100644 index 0000000..e0c1731 --- /dev/null +++ b/_build/html/_sources/week2.rst.txt @@ -0,0 +1,5 @@ +2週目 +======================== + +1週目で学んだことを活かして、組み合わせてみましょう。 + diff --git a/_build/html/arduino.html b/_build/html/arduino.html index 18f4ed7..b275914 100644 --- a/_build/html/arduino.html +++ b/_build/html/arduino.html @@ -7,7 +7,7 @@ - Arduino — TestRTP ドキュメント + Arduino — IoT Programming ドキュメント @@ -42,9 +42,7 @@ - - - + @@ -58,7 +56,7 @@ - TestRTP + IoT Programming @@ -90,16 +88,12 @@

Contents:

-
    -
  • イントロダクション
  • -
  • Arduino
  • -
  • Tutorial
  • -
  • Section Structure
  • -
  • Body Elements
  • -
  • Inline Markup
  • -
  • Directive Quick Reference
  • -
  • Interpreted Text Role Quick Reference
  • -
  • Conclusion
  • + @@ -115,7 +109,7 @@ @@ -176,7 +170,7 @@
    Conclusion が、結論への内部参照リンクになります。

    Conclusion が、結論への内部参照リンクになります。

    -
    リスト 2 src/sketch_feb25a.ino
    +
    src/sketch_feb25a.ino
    void setup() {
       // put your setup code here, to run once:
     
    @@ -190,7 +184,7 @@
     
    -
    リスト 3 src/factorytest.ino
    +
    src/factorytest.ino
     1
      2
      3
    @@ -236,6 +230,58 @@
     

    これらのソースコードは、ファイルから直接差し込むほうが、間違いは少ないと思われます。

    +
    +
    src/analogread.ino
    +
     1
    + 2
    + 3
    + 4
    + 5
    + 6
    + 7
    + 8
    + 9
    +10
    +11
    +12
    +13
    +14
    +15
    +16
    +17
    +18
    +19
    +20
    +21
    +22
    +23
    +24
    #include <M5StickCPlus.h>
    +
    +int PIN = 26;
    +
    +// +--- 15kΩ抵抗 --+-- CdSセル --+
    +// |              |             |
    +// GND           G26           3V3
    +// https://www.storange.jp/2012/03/arduinocds.html
    +
    +// 注意点: https://lang-ship.com/reference/unofficial/M5StickC/Peripherals/ADC/
    +
    +void setup() {
    +  M5.begin();
    +
    +  pinMode(PIN, ANALOG); // PINのモード設定
    +  
    +  // https://lang-ship.com/blog/work/m5stickc-io/
    +}
    +
    +void loop() {
    +  Serial.printf("%04d\n", analogRead(PIN) ); // 暗 0〜4095 明
    +   
    +  delay(1000);
    +}
    +
    +
    +
    @@ -243,10 +289,6 @@