Prel docs for v0.5

This commit is contained in:
Magnus Persson 2022-01-06 21:01:06 +01:00
parent 51a2d30824
commit 2fb86c594a
20 changed files with 597 additions and 72 deletions

2
.gitignore vendored
View File

@ -5,5 +5,5 @@ test/*.md
test/env/* test/env/*
test/configure_*.py test/configure_*.py
TODO.md TODO.md
docs/_build/* src_docs/_build/*
data/*.min.htm data/*.min.htm

View File

@ -4,11 +4,8 @@ Backlog of changes
Documentation Documentation
------------- -------------
- Create page with list of releases
- Updates over OTA (from PC) - Updates over OTA (from PC)
- Write compile instructions
- Write contribution instructions - Write contribution instructions
- publish docs
Code Code
------------- -------------

View File

@ -1,21 +1,93 @@
Compiling the software Compiling the software
----------------------- -----------------------
This section is under construction. Tools
=====
I use the following tools in order to build and manage the software:
VSCODE + PlatformIO
=============================
* Visual Studio Code
* PlatformIO
* Git for Windows
* VSCode plugin: Minify (used to minimise the html files)
Targets Targets
============================= =======
In the repository there are 3 targets defined
* gravity-debug; Maximum logging for trouble shooting, deep sleep is disabled.
* gravity-release; Standard release
* gravity-perf; Standard release but contains code for measuring performance
Source structure Source structure
============================= ================
.. list-table:: Directory structure
:widths: 40 60
:header-rows: 1
* - path
- content
* - /bin
- Contains compiled binaries
* - /data
- Directory for flashing device filesystem
* - /doc
- Various external documents used as input
* - /docs
- Folder published to github pages
* - /html
- Source for html files
* - /img
- Images uses in README.md
* - /lib
- External libraries used when compiling
* - /script
- Scripts used in build process
* - /src
- Source code for software
* - /src_docs
- Source code for documentation
* - /stl
- 3d models
* - /test
- Test data for developing html files
Options Options
============================= =======
This is a list of C++ defines that is used to enable/disable functions in the code.
.. list-table:: Defines
:widths: 40 60
:header-rows: 1
* - define
- description
* - ACTIVATE_OTA
- Enables the OTA functionallity in the code
* - USE_GYRO_TEMP
- Uses temperature from gyro instead of DS18B20 (experimental)
* - SKIP_SLEEPMODE
- THe device never goes into sleep mode, useful when developing.
* - CFG_DISABLE_LOGGING
- Done include verbose logging in Config class. Excessive logging may crash device.
* - GYRO_DISABLE_LOGGING
- Done include verbose logging in Gyro class. Excessive logging may crash device.
* - PUSH_DISABLE_LOGGING
- Done include verbose logging in PushTarget class. Excessive logging may crash device.
* - TSEN_DISABLE_LOGGING
- Done include verbose logging in TempSensor class. Excessive logging may crash device.
* - WEB_DISABLE_LOGGING
- Done include verbose logging in WebServer class. Excessive logging may crash device.
* - MAIN_DISABLE_LOGGING
- Done include verbose logging in Main class. Excessive logging may crash device.
* - USE_LITTLEFS
- Use the new filesystem in Ardurino
* - EMBED_HTML
- Html files are included in code, if not defined they are served from the file system.
* - USER_SSID
- If defined the device will always use this SSID
* - USER_SSID_PWD
- Password to the SSID
* - CFG_APPVER
- Defines the version of the compiled software

View File

@ -21,7 +21,8 @@ projects based on esp8266 and also started to brew beer so this combination was
The hardware design comes from the fantastic iSpindle project so that is not covered in this documentation. The hardware design comes from the fantastic iSpindle project so that is not covered in this documentation.
My approach to this software is a little different from that the original ispindle firmware. My approach to this software is a little different from that the original ispindle firmware. The github repository can
be found here; https://github.com/mp-se/gravitymon
.. note:: .. note::
@ -52,23 +53,59 @@ Credits to
This software uses the following libraries and without these this would have been much more difficult to acheive: This software uses the following libraries and without these this would have been much more difficult to acheive:
* https://github.com/jrowberg/i2cdevlib.git * https://github.com/jrowberg/i2cdevlib.git
This library contains the basic code to interact with the gyro + many more chips.
* https://github.com/codeplea/tinyexpr * https://github.com/codeplea/tinyexpr
Proccess the gravity formula and calculate the gravity and various corrections.
* https://github.com/graphitemaster/incbin * https://github.com/graphitemaster/incbin
Include binary files into the code, used to service html files.
* https://github.com/khoih-prog/ESP_DoubleResetDetector * https://github.com/khoih-prog/ESP_DoubleResetDetector
Can detect if the reset button is pressed twice, is used to enter WIFI config mode.
* https://github.com/tzapu/WiFiManager * https://github.com/tzapu/WiFiManager
Configure wifi settings.
* https://github.com/thijse/Arduino-Log * https://github.com/thijse/Arduino-Log
Logging library for handling different loglevels and configure what sent over the serial.
* https://github.com/bblanchon/ArduinoJson * https://github.com/bblanchon/ArduinoJson
Json parser/creator used in configuration files and API's
* https://github.com/PaulStoffregen/OneWire * https://github.com/PaulStoffregen/OneWire
Communication library used for interacting with temperature sensor.
* https://github.com/milesburton/Arduino-Temperature-Control-Library * https://github.com/milesburton/Arduino-Temperature-Control-Library
Interaction with the DS18B20 sensor
* https://github.com/Rotario/arduinoCurveFitting * https://github.com/Rotario/arduinoCurveFitting
Create the gravity formula.
* https://graphjs.com/ * https://graphjs.com/
Render the graphs in the UI.
* https://getbootstrap.com/ * https://getbootstrap.com/
CSS templates for the web page.
.. toctree:: .. toctree::
:maxdepth: 2 :maxdepth: 2
:caption: Contents: :caption: Contents:
releases
functionallity functionallity
installation installation
configuration configuration

View File

@ -13,20 +13,33 @@ The basic command for flashing is;
In the /bin directory you will find 3 different firmware builds; In the /bin directory you will find 3 different firmware builds;
* firmware.bin - This is the standard release build (prefered version) * **firmware.bin**
* firmware-perf.bin - This version also submits performance data to an influx database with detailed execution times.
* firmware-debug.bin - Development build. Not recommended for normal use. This is the standard release build (prefered version)
* **firmware-perf.bin**
This version also submits performance data to an influx database with detailed execution times.
* **firmware-debug.bin**
Development build. Not recommended for normal use.
In these versions all the html files are embedded in the binaries. The file system is currently only used for storing In these versions all the html files are embedded in the binaries. The file system is currently only used for storing
the configuration file. the configuration file.
If the software becomes so large the html files can be moved to the file system, but this is not enabled by default. This makes If the software becomes so large the html files can be moved to the file system, but this is not enabled by
installation much easier and ensure that html files and code is in sync. default (see compiling for details). This approach makes installation much easier and ensure that html files
and code is in sync.
Configuring WIFI Configuring WIFI
================ ================
When the device is flashed it will need to have WIFI configuration in order to work. If this is not configured in the device it will create an wirless access point called `GravMon`. When the device is flashed it will need to have WIFI configuration in order to work. If you have used other software on
the device its possible that wifi settings exist.
If this is not configured in the device it will create an wirless access point called `GravMon`. Connect to this AP and
enter the SSID and password you want to use. If the web page dont open automatically you can enter the following adress
in the browser: **http://192.168.4.1**
Connect to this AP and enter the SSID and password you want to use. If the web page dont open automatically you can enter the following adress in the browser: **http://192.168.4.1**

View File

@ -0,0 +1,9 @@
Releases
------------
There is not yet any releases publised.
Latest stable development version is: **v0.4.0**
https://github.com/mp-se/gravitymon/releases/tag/v0.4.0

View File

@ -38,6 +38,7 @@
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu"> </div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<p class="caption" role="heading"><span class="caption-text">Contents:</span></p> <p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
<ul class="current"> <ul class="current">
<li class="toctree-l1"><a class="reference internal" href="releases.html">Releases</a></li>
<li class="toctree-l1"><a class="reference internal" href="functionallity.html">Functionallity</a></li> <li class="toctree-l1"><a class="reference internal" href="functionallity.html">Functionallity</a></li>
<li class="toctree-l1"><a class="reference internal" href="installation.html">Installation</a></li> <li class="toctree-l1"><a class="reference internal" href="installation.html">Installation</a></li>
<li class="toctree-l1"><a class="reference internal" href="configuration.html">Configuration</a></li> <li class="toctree-l1"><a class="reference internal" href="configuration.html">Configuration</a></li>
@ -79,11 +80,8 @@
<section id="documentation"> <section id="documentation">
<h2>Documentation<a class="headerlink" href="#documentation" title="Permalink to this headline"></a></h2> <h2>Documentation<a class="headerlink" href="#documentation" title="Permalink to this headline"></a></h2>
<ul class="simple"> <ul class="simple">
<li><p>Create page with list of releases</p></li>
<li><p>Updates over OTA (from PC)</p></li> <li><p>Updates over OTA (from PC)</p></li>
<li><p>Write compile instructions</p></li>
<li><p>Write contribution instructions</p></li> <li><p>Write contribution instructions</p></li>
<li><p>publish docs</p></li>
</ul> </ul>
</section> </section>
<section id="code"> <section id="code">

View File

@ -43,7 +43,7 @@
<li class="toctree-l1"><a class="reference internal" href="installation.html">Installation</a></li> <li class="toctree-l1"><a class="reference internal" href="installation.html">Installation</a></li>
<li class="toctree-l1"><a class="reference internal" href="configuration.html">Configuration</a></li> <li class="toctree-l1"><a class="reference internal" href="configuration.html">Configuration</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">Compiling the software</a><ul> <li class="toctree-l1 current"><a class="current reference internal" href="#">Compiling the software</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#vscode-platformio">VSCODE + PlatformIO</a></li> <li class="toctree-l2"><a class="reference internal" href="#tools">Tools</a></li>
<li class="toctree-l2"><a class="reference internal" href="#targets">Targets</a></li> <li class="toctree-l2"><a class="reference internal" href="#targets">Targets</a></li>
<li class="toctree-l2"><a class="reference internal" href="#source-structure">Source structure</a></li> <li class="toctree-l2"><a class="reference internal" href="#source-structure">Source structure</a></li>
<li class="toctree-l2"><a class="reference internal" href="#options">Options</a></li> <li class="toctree-l2"><a class="reference internal" href="#options">Options</a></li>
@ -79,18 +79,137 @@
<section id="compiling-the-software"> <section id="compiling-the-software">
<h1>Compiling the software<a class="headerlink" href="#compiling-the-software" title="Permalink to this headline"></a></h1> <h1>Compiling the software<a class="headerlink" href="#compiling-the-software" title="Permalink to this headline"></a></h1>
<p>This section is under construction.</p> <section id="tools">
<section id="vscode-platformio"> <h2>Tools<a class="headerlink" href="#tools" title="Permalink to this headline"></a></h2>
<h2>VSCODE + PlatformIO<a class="headerlink" href="#vscode-platformio" title="Permalink to this headline"></a></h2> <p>I use the following tools in order to build and manage the software:</p>
<ul class="simple">
<li><p>Visual Studio Code</p></li>
<li><p>PlatformIO</p></li>
<li><p>Git for Windows</p></li>
<li><p>VSCode plugin: Minify (used to minimise the html files)</p></li>
</ul>
</section> </section>
<section id="targets"> <section id="targets">
<h2>Targets<a class="headerlink" href="#targets" title="Permalink to this headline"></a></h2> <h2>Targets<a class="headerlink" href="#targets" title="Permalink to this headline"></a></h2>
<p>In the repository there are 3 targets defined</p>
<ul class="simple">
<li><p>gravity-debug; Maximum logging for trouble shooting, deep sleep is disabled.</p></li>
<li><p>gravity-release; Standard release</p></li>
<li><p>gravity-perf; Standard release but contains code for measuring performance</p></li>
</ul>
</section> </section>
<section id="source-structure"> <section id="source-structure">
<h2>Source structure<a class="headerlink" href="#source-structure" title="Permalink to this headline"></a></h2> <h2>Source structure<a class="headerlink" href="#source-structure" title="Permalink to this headline"></a></h2>
<table class="colwidths-given docutils align-default" id="id1">
<caption><span class="caption-text">Directory structure</span><a class="headerlink" href="#id1" title="Permalink to this table"></a></caption>
<colgroup>
<col style="width: 40%" />
<col style="width: 60%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"><p>path</p></th>
<th class="head"><p>content</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p>/bin</p></td>
<td><p>Contains compiled binaries</p></td>
</tr>
<tr class="row-odd"><td><p>/data</p></td>
<td><p>Directory for flashing device filesystem</p></td>
</tr>
<tr class="row-even"><td><p>/doc</p></td>
<td><p>Various external documents used as input</p></td>
</tr>
<tr class="row-odd"><td><p>/docs</p></td>
<td><p>Folder published to github pages</p></td>
</tr>
<tr class="row-even"><td><p>/html</p></td>
<td><p>Source for html files</p></td>
</tr>
<tr class="row-odd"><td><p>/img</p></td>
<td><p>Images uses in README.md</p></td>
</tr>
<tr class="row-even"><td><p>/lib</p></td>
<td><p>External libraries used when compiling</p></td>
</tr>
<tr class="row-odd"><td><p>/script</p></td>
<td><p>Scripts used in build process</p></td>
</tr>
<tr class="row-even"><td><p>/src</p></td>
<td><p>Source code for software</p></td>
</tr>
<tr class="row-odd"><td><p>/src_docs</p></td>
<td><p>Source code for documentation</p></td>
</tr>
<tr class="row-even"><td><p>/stl</p></td>
<td><p>3d models</p></td>
</tr>
<tr class="row-odd"><td><p>/test</p></td>
<td><p>Test data for developing html files</p></td>
</tr>
</tbody>
</table>
</section> </section>
<section id="options"> <section id="options">
<h2>Options<a class="headerlink" href="#options" title="Permalink to this headline"></a></h2> <h2>Options<a class="headerlink" href="#options" title="Permalink to this headline"></a></h2>
<p>This is a list of C++ defines that is used to enable/disable functions in the code.</p>
<table class="colwidths-given docutils align-default" id="id2">
<caption><span class="caption-text">Defines</span><a class="headerlink" href="#id2" title="Permalink to this table"></a></caption>
<colgroup>
<col style="width: 40%" />
<col style="width: 60%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"><p>define</p></th>
<th class="head"><p>description</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p>ACTIVATE_OTA</p></td>
<td><p>Enables the OTA functionallity in the code</p></td>
</tr>
<tr class="row-odd"><td><p>USE_GYRO_TEMP</p></td>
<td><p>Uses temperature from gyro instead of DS18B20 (experimental)</p></td>
</tr>
<tr class="row-even"><td><p>SKIP_SLEEPMODE</p></td>
<td><p>THe device never goes into sleep mode, useful when developing.</p></td>
</tr>
<tr class="row-odd"><td><p>CFG_DISABLE_LOGGING</p></td>
<td><p>Done include verbose logging in Config class. Excessive logging may crash device.</p></td>
</tr>
<tr class="row-even"><td><p>GYRO_DISABLE_LOGGING</p></td>
<td><p>Done include verbose logging in Gyro class. Excessive logging may crash device.</p></td>
</tr>
<tr class="row-odd"><td><p>PUSH_DISABLE_LOGGING</p></td>
<td><p>Done include verbose logging in PushTarget class. Excessive logging may crash device.</p></td>
</tr>
<tr class="row-even"><td><p>TSEN_DISABLE_LOGGING</p></td>
<td><p>Done include verbose logging in TempSensor class. Excessive logging may crash device.</p></td>
</tr>
<tr class="row-odd"><td><p>WEB_DISABLE_LOGGING</p></td>
<td><p>Done include verbose logging in WebServer class. Excessive logging may crash device.</p></td>
</tr>
<tr class="row-even"><td><p>MAIN_DISABLE_LOGGING</p></td>
<td><p>Done include verbose logging in Main class. Excessive logging may crash device.</p></td>
</tr>
<tr class="row-odd"><td><p>USE_LITTLEFS</p></td>
<td><p>Use the new filesystem in Ardurino</p></td>
</tr>
<tr class="row-even"><td><p>EMBED_HTML</p></td>
<td><p>Html files are included in code, if not defined they are served from the file system.</p></td>
</tr>
<tr class="row-odd"><td><p>USER_SSID</p></td>
<td><p>If defined the device will always use this SSID</p></td>
</tr>
<tr class="row-even"><td><p>USER_SSID_PWD</p></td>
<td><p>Password to the SSID</p></td>
</tr>
<tr class="row-odd"><td><p>CFG_APPVER</p></td>
<td><p>Defines the version of the compiled software</p></td>
</tr>
</tbody>
</table>
</section> </section>
</section> </section>

View File

@ -36,6 +36,7 @@
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu"> </div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<p class="caption" role="heading"><span class="caption-text">Contents:</span></p> <p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
<ul> <ul>
<li class="toctree-l1"><a class="reference internal" href="releases.html">Releases</a></li>
<li class="toctree-l1"><a class="reference internal" href="functionallity.html">Functionallity</a></li> <li class="toctree-l1"><a class="reference internal" href="functionallity.html">Functionallity</a></li>
<li class="toctree-l1"><a class="reference internal" href="installation.html">Installation</a></li> <li class="toctree-l1"><a class="reference internal" href="installation.html">Installation</a></li>
<li class="toctree-l1"><a class="reference internal" href="configuration.html">Configuration</a></li> <li class="toctree-l1"><a class="reference internal" href="configuration.html">Configuration</a></li>

View File

@ -18,7 +18,7 @@
<script src="_static/js/theme.js"></script> <script src="_static/js/theme.js"></script>
<link rel="index" title="Index" href="genindex.html" /> <link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" /> <link rel="search" title="Search" href="search.html" />
<link rel="next" title="Functionallity" href="functionallity.html" /> <link rel="next" title="Releases" href="releases.html" />
</head> </head>
<body class="wy-body-for-nav"> <body class="wy-body-for-nav">
@ -38,6 +38,7 @@
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu"> </div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<p class="caption" role="heading"><span class="caption-text">Contents:</span></p> <p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
<ul> <ul>
<li class="toctree-l1"><a class="reference internal" href="releases.html">Releases</a></li>
<li class="toctree-l1"><a class="reference internal" href="functionallity.html">Functionallity</a></li> <li class="toctree-l1"><a class="reference internal" href="functionallity.html">Functionallity</a></li>
<li class="toctree-l1"><a class="reference internal" href="installation.html">Installation</a></li> <li class="toctree-l1"><a class="reference internal" href="installation.html">Installation</a></li>
<li class="toctree-l1"><a class="reference internal" href="configuration.html">Configuration</a></li> <li class="toctree-l1"><a class="reference internal" href="configuration.html">Configuration</a></li>
@ -82,7 +83,8 @@ of fermentation.</p>
<p>I started GravityMon because i like to create software and wanted to do some low level programming. I had done a few <p>I started GravityMon because i like to create software and wanted to do some low level programming. I had done a few
projects based on esp8266 and also started to brew beer so this combination was quite natural.</p> projects based on esp8266 and also started to brew beer so this combination was quite natural.</p>
<p>The hardware design comes from the fantastic iSpindle project so that is not covered in this documentation.</p> <p>The hardware design comes from the fantastic iSpindle project so that is not covered in this documentation.</p>
<p>My approach to this software is a little different from that the original ispindle firmware.</p> <p>My approach to this software is a little different from that the original ispindle firmware. The github repository can
be found here; <a class="reference external" href="https://github.com/mp-se/gravitymon">https://github.com/mp-se/gravitymon</a></p>
<div class="admonition note"> <div class="admonition note">
<p class="admonition-title">Note</p> <p class="admonition-title">Note</p>
<p>This software is in the early stages even though its more than one year old so if you find issues, please <p>This software is in the early stages even though its more than one year old so if you find issues, please
@ -109,23 +111,48 @@ over the last 6 months without any issues.</p>
<section id="credits-to"> <section id="credits-to">
<h2>Credits to<a class="headerlink" href="#credits-to" title="Permalink to this headline"></a></h2> <h2>Credits to<a class="headerlink" href="#credits-to" title="Permalink to this headline"></a></h2>
<p>This software uses the following libraries and without these this would have been much more difficult to acheive:</p> <p>This software uses the following libraries and without these this would have been much more difficult to acheive:</p>
<ul class="simple"> <ul>
<li><p><a class="reference external" href="https://github.com/jrowberg/i2cdevlib.git">https://github.com/jrowberg/i2cdevlib.git</a></p></li> <li><p><a class="reference external" href="https://github.com/jrowberg/i2cdevlib.git">https://github.com/jrowberg/i2cdevlib.git</a></p>
<li><p><a class="reference external" href="https://github.com/codeplea/tinyexpr">https://github.com/codeplea/tinyexpr</a></p></li> <p>This library contains the basic code to interact with the gyro + many more chips.</p>
<li><p><a class="reference external" href="https://github.com/graphitemaster/incbin">https://github.com/graphitemaster/incbin</a></p></li> </li>
<li><p><a class="reference external" href="https://github.com/khoih-prog/ESP_DoubleResetDetector">https://github.com/khoih-prog/ESP_DoubleResetDetector</a></p></li> <li><p><a class="reference external" href="https://github.com/codeplea/tinyexpr">https://github.com/codeplea/tinyexpr</a></p>
<li><p><a class="reference external" href="https://github.com/tzapu/WiFiManager">https://github.com/tzapu/WiFiManager</a></p></li> <p>Proccess the gravity formula and calculate the gravity and various corrections.</p>
<li><p><a class="reference external" href="https://github.com/thijse/Arduino-Log">https://github.com/thijse/Arduino-Log</a></p></li> </li>
<li><p><a class="reference external" href="https://github.com/bblanchon/ArduinoJson">https://github.com/bblanchon/ArduinoJson</a></p></li> <li><p><a class="reference external" href="https://github.com/graphitemaster/incbin">https://github.com/graphitemaster/incbin</a></p>
<li><p><a class="reference external" href="https://github.com/PaulStoffregen/OneWire">https://github.com/PaulStoffregen/OneWire</a></p></li> <p>Include binary files into the code, used to service html files.</p>
<li><p><a class="reference external" href="https://github.com/milesburton/Arduino-Temperature-Control-Library">https://github.com/milesburton/Arduino-Temperature-Control-Library</a></p></li> </li>
<li><p><a class="reference external" href="https://github.com/Rotario/arduinoCurveFitting">https://github.com/Rotario/arduinoCurveFitting</a></p></li> <li><p><a class="reference external" href="https://github.com/khoih-prog/ESP_DoubleResetDetector">https://github.com/khoih-prog/ESP_DoubleResetDetector</a></p>
<li><p><a class="reference external" href="https://graphjs.com/">https://graphjs.com/</a></p></li> <p>Can detect if the reset button is pressed twice, is used to enter WIFI config mode.</p>
<li><p><a class="reference external" href="https://getbootstrap.com/">https://getbootstrap.com/</a></p></li> </li>
<li><p><a class="reference external" href="https://github.com/tzapu/WiFiManager">https://github.com/tzapu/WiFiManager</a></p>
<p>Configure wifi settings.</p>
</li>
<li><p><a class="reference external" href="https://github.com/thijse/Arduino-Log">https://github.com/thijse/Arduino-Log</a></p>
<p>Logging library for handling different loglevels and configure what sent over the serial.</p>
</li>
<li><p><a class="reference external" href="https://github.com/bblanchon/ArduinoJson">https://github.com/bblanchon/ArduinoJson</a></p>
<p>Json parser/creator used in configuration files and APIs</p>
</li>
<li><p><a class="reference external" href="https://github.com/PaulStoffregen/OneWire">https://github.com/PaulStoffregen/OneWire</a></p>
<p>Communication library used for interacting with temperature sensor.</p>
</li>
<li><p><a class="reference external" href="https://github.com/milesburton/Arduino-Temperature-Control-Library">https://github.com/milesburton/Arduino-Temperature-Control-Library</a></p>
<p>Interaction with the DS18B20 sensor</p>
</li>
<li><p><a class="reference external" href="https://github.com/Rotario/arduinoCurveFitting">https://github.com/Rotario/arduinoCurveFitting</a></p>
<p>Create the gravity formula.</p>
</li>
<li><p><a class="reference external" href="https://graphjs.com/">https://graphjs.com/</a></p>
<p>Render the graphs in the UI.</p>
</li>
<li><p><a class="reference external" href="https://getbootstrap.com/">https://getbootstrap.com/</a></p>
<p>CSS templates for the web page.</p>
</li>
</ul> </ul>
<div class="toctree-wrapper compound"> <div class="toctree-wrapper compound">
<p class="caption" role="heading"><span class="caption-text">Contents:</span></p> <p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
<ul> <ul>
<li class="toctree-l1"><a class="reference internal" href="releases.html">Releases</a></li>
<li class="toctree-l1"><a class="reference internal" href="functionallity.html">Functionallity</a><ul> <li class="toctree-l1"><a class="reference internal" href="functionallity.html">Functionallity</a><ul>
<li class="toctree-l2"><a class="reference internal" href="functionallity.html#the-main-differences">The main differences</a></li> <li class="toctree-l2"><a class="reference internal" href="functionallity.html#the-main-differences">The main differences</a></li>
<li class="toctree-l2"><a class="reference internal" href="functionallity.html#other-features">Other features</a></li> <li class="toctree-l2"><a class="reference internal" href="functionallity.html#other-features">Other features</a></li>
@ -147,7 +174,7 @@ over the last 6 months without any issues.</p>
</ul> </ul>
</li> </li>
<li class="toctree-l1"><a class="reference internal" href="compiling.html">Compiling the software</a><ul> <li class="toctree-l1"><a class="reference internal" href="compiling.html">Compiling the software</a><ul>
<li class="toctree-l2"><a class="reference internal" href="compiling.html#vscode-platformio">VSCODE + PlatformIO</a></li> <li class="toctree-l2"><a class="reference internal" href="compiling.html#tools">Tools</a></li>
<li class="toctree-l2"><a class="reference internal" href="compiling.html#targets">Targets</a></li> <li class="toctree-l2"><a class="reference internal" href="compiling.html#targets">Targets</a></li>
<li class="toctree-l2"><a class="reference internal" href="compiling.html#source-structure">Source structure</a></li> <li class="toctree-l2"><a class="reference internal" href="compiling.html#source-structure">Source structure</a></li>
<li class="toctree-l2"><a class="reference internal" href="compiling.html#options">Options</a></li> <li class="toctree-l2"><a class="reference internal" href="compiling.html#options">Options</a></li>
@ -176,7 +203,7 @@ over the last 6 months without any issues.</p>
</div> </div>
</div> </div>
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer"> <footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<a href="functionallity.html" class="btn btn-neutral float-right" title="Functionallity" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a> <a href="releases.html" class="btn btn-neutral float-right" title="Releases" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
</div> </div>
<hr/> <hr/>

View File

@ -84,20 +84,30 @@ here; <a class="reference external" href="https://docs.espressif.com/projects/es
<p>The basic command for flashing is;</p> <p>The basic command for flashing is;</p>
<p><code class="docutils literal notranslate"><span class="pre">esptool.py</span> <span class="pre">--port</span> <span class="pre">COM4</span> <span class="pre">write_flash</span> <span class="pre">0x1000</span> <span class="pre">firmware.bin</span></code></p> <p><code class="docutils literal notranslate"><span class="pre">esptool.py</span> <span class="pre">--port</span> <span class="pre">COM4</span> <span class="pre">write_flash</span> <span class="pre">0x1000</span> <span class="pre">firmware.bin</span></code></p>
<p>In the /bin directory you will find 3 different firmware builds;</p> <p>In the /bin directory you will find 3 different firmware builds;</p>
<ul class="simple"> <ul>
<li><p>firmware.bin - This is the standard release build (prefered version)</p></li> <li><p><strong>firmware.bin</strong></p>
<li><p>firmware-perf.bin - This version also submits performance data to an influx database with detailed execution times.</p></li> <p>This is the standard release build (prefered version)</p>
<li><p>firmware-debug.bin - Development build. Not recommended for normal use.</p></li> </li>
<li><p><strong>firmware-perf.bin</strong></p>
<p>This version also submits performance data to an influx database with detailed execution times.</p>
</li>
<li><p><strong>firmware-debug.bin</strong></p>
<p>Development build. Not recommended for normal use.</p>
</li>
</ul> </ul>
<p>In these versions all the html files are embedded in the binaries. The file system is currently only used for storing <p>In these versions all the html files are embedded in the binaries. The file system is currently only used for storing
the configuration file.</p> the configuration file.</p>
<p>If the software becomes so large the html files can be moved to the file system, but this is not enabled by default. This makes <p>If the software becomes so large the html files can be moved to the file system, but this is not enabled by
installation much easier and ensure that html files and code is in sync.</p> default (see compiling for details). This approach makes installation much easier and ensure that html files
and code is in sync.</p>
</section> </section>
<section id="configuring-wifi"> <section id="configuring-wifi">
<h2>Configuring WIFI<a class="headerlink" href="#configuring-wifi" title="Permalink to this headline"></a></h2> <h2>Configuring WIFI<a class="headerlink" href="#configuring-wifi" title="Permalink to this headline"></a></h2>
<p>When the device is flashed it will need to have WIFI configuration in order to work. If this is not configured in the device it will create an wirless access point called <cite>GravMon</cite>.</p> <p>When the device is flashed it will need to have WIFI configuration in order to work. If you have used other software on
<p>Connect to this AP and enter the SSID and password you want to use. If the web page dont open automatically you can enter the following adress in the browser: <strong>http://192.168.4.1</strong></p> the device its possible that wifi settings exist.</p>
<p>If this is not configured in the device it will create an wirless access point called <cite>GravMon</cite>. Connect to this AP and
enter the SSID and password you want to use. If the web page dont open automatically you can enter the following adress
in the browser: <strong>http://192.168.4.1</strong></p>
</section> </section>
</section> </section>

Binary file not shown.

113
docs/releases.html Normal file
View File

@ -0,0 +1,113 @@
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Releases &mdash; GravityMon 0.5.0 documentation</title>
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<!--[if lt IE 9]>
<script src="_static/js/html5shiv.min.js"></script>
<![endif]-->
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/js/theme.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="Functionallity" href="functionallity.html" />
<link rel="prev" title="Welcome to GravityMons documentation!" href="index.html" />
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="index.html" class="icon icon-home"> GravityMon
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
<ul class="current">
<li class="toctree-l1 current"><a class="current reference internal" href="#">Releases</a></li>
<li class="toctree-l1"><a class="reference internal" href="functionallity.html">Functionallity</a></li>
<li class="toctree-l1"><a class="reference internal" href="installation.html">Installation</a></li>
<li class="toctree-l1"><a class="reference internal" href="configuration.html">Configuration</a></li>
<li class="toctree-l1"><a class="reference internal" href="compiling.html">Compiling the software</a></li>
<li class="toctree-l1"><a class="reference internal" href="contributing.html">Contributing</a></li>
<li class="toctree-l1"><a class="reference internal" href="backlog.html">Backlog of changes</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="index.html">GravityMon</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="index.html" class="icon icon-home"></a> &raquo;</li>
<li>Releases</li>
<li class="wy-breadcrumbs-aside">
<a href="_sources/releases.rst.txt" rel="nofollow"> View page source</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<section id="releases">
<h1>Releases<a class="headerlink" href="#releases" title="Permalink to this headline"></a></h1>
<p>There is not yet any releases publised.</p>
<p>Latest stable development version is: <strong>v0.4.0</strong></p>
<p><a class="reference external" href="https://github.com/mp-se/gravitymon/releases/tag/v0.4.0">https://github.com/mp-se/gravitymon/releases/tag/v0.4.0</a></p>
</section>
</div>
</div>
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<a href="index.html" class="btn btn-neutral float-left" title="Welcome to GravityMons documentation!" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
<a href="functionallity.html" class="btn btn-neutral float-right" title="Functionallity" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
</div>
<hr/>
<div role="contentinfo">
<p>&#169; Copyright 2021-2022, Magnus Persson.</p>
</div>
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</body>
</html>

View File

@ -39,6 +39,7 @@
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu"> </div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<p class="caption" role="heading"><span class="caption-text">Contents:</span></p> <p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
<ul> <ul>
<li class="toctree-l1"><a class="reference internal" href="releases.html">Releases</a></li>
<li class="toctree-l1"><a class="reference internal" href="functionallity.html">Functionallity</a></li> <li class="toctree-l1"><a class="reference internal" href="functionallity.html">Functionallity</a></li>
<li class="toctree-l1"><a class="reference internal" href="installation.html">Installation</a></li> <li class="toctree-l1"><a class="reference internal" href="installation.html">Installation</a></li>
<li class="toctree-l1"><a class="reference internal" href="configuration.html">Configuration</a></li> <li class="toctree-l1"><a class="reference internal" href="configuration.html">Configuration</a></li>

File diff suppressed because one or more lines are too long

View File

@ -4,11 +4,8 @@ Backlog of changes
Documentation Documentation
------------- -------------
- Create page with list of releases
- Updates over OTA (from PC) - Updates over OTA (from PC)
- Write compile instructions
- Write contribution instructions - Write contribution instructions
- publish docs
Code Code
------------- -------------

View File

@ -1,21 +1,93 @@
Compiling the software Compiling the software
----------------------- -----------------------
This section is under construction. Tools
=====
I use the following tools in order to build and manage the software:
VSCODE + PlatformIO
=============================
* Visual Studio Code
* PlatformIO
* Git for Windows
* VSCode plugin: Minify (used to minimise the html files)
Targets Targets
============================= =======
In the repository there are 3 targets defined
* gravity-debug; Maximum logging for trouble shooting, deep sleep is disabled.
* gravity-release; Standard release
* gravity-perf; Standard release but contains code for measuring performance
Source structure Source structure
============================= ================
.. list-table:: Directory structure
:widths: 40 60
:header-rows: 1
* - path
- content
* - /bin
- Contains compiled binaries
* - /data
- Directory for flashing device filesystem
* - /doc
- Various external documents used as input
* - /docs
- Folder published to github pages
* - /html
- Source for html files
* - /img
- Images uses in README.md
* - /lib
- External libraries used when compiling
* - /script
- Scripts used in build process
* - /src
- Source code for software
* - /src_docs
- Source code for documentation
* - /stl
- 3d models
* - /test
- Test data for developing html files
Options Options
============================= =======
This is a list of C++ defines that is used to enable/disable functions in the code.
.. list-table:: Defines
:widths: 40 60
:header-rows: 1
* - define
- description
* - ACTIVATE_OTA
- Enables the OTA functionallity in the code
* - USE_GYRO_TEMP
- Uses temperature from gyro instead of DS18B20 (experimental)
* - SKIP_SLEEPMODE
- THe device never goes into sleep mode, useful when developing.
* - CFG_DISABLE_LOGGING
- Done include verbose logging in Config class. Excessive logging may crash device.
* - GYRO_DISABLE_LOGGING
- Done include verbose logging in Gyro class. Excessive logging may crash device.
* - PUSH_DISABLE_LOGGING
- Done include verbose logging in PushTarget class. Excessive logging may crash device.
* - TSEN_DISABLE_LOGGING
- Done include verbose logging in TempSensor class. Excessive logging may crash device.
* - WEB_DISABLE_LOGGING
- Done include verbose logging in WebServer class. Excessive logging may crash device.
* - MAIN_DISABLE_LOGGING
- Done include verbose logging in Main class. Excessive logging may crash device.
* - USE_LITTLEFS
- Use the new filesystem in Ardurino
* - EMBED_HTML
- Html files are included in code, if not defined they are served from the file system.
* - USER_SSID
- If defined the device will always use this SSID
* - USER_SSID_PWD
- Password to the SSID
* - CFG_APPVER
- Defines the version of the compiled software

View File

@ -21,7 +21,8 @@ projects based on esp8266 and also started to brew beer so this combination was
The hardware design comes from the fantastic iSpindle project so that is not covered in this documentation. The hardware design comes from the fantastic iSpindle project so that is not covered in this documentation.
My approach to this software is a little different from that the original ispindle firmware. My approach to this software is a little different from that the original ispindle firmware. The github repository can
be found here; https://github.com/mp-se/gravitymon
.. note:: .. note::
@ -52,23 +53,59 @@ Credits to
This software uses the following libraries and without these this would have been much more difficult to acheive: This software uses the following libraries and without these this would have been much more difficult to acheive:
* https://github.com/jrowberg/i2cdevlib.git * https://github.com/jrowberg/i2cdevlib.git
This library contains the basic code to interact with the gyro + many more chips.
* https://github.com/codeplea/tinyexpr * https://github.com/codeplea/tinyexpr
Proccess the gravity formula and calculate the gravity and various corrections.
* https://github.com/graphitemaster/incbin * https://github.com/graphitemaster/incbin
Include binary files into the code, used to service html files.
* https://github.com/khoih-prog/ESP_DoubleResetDetector * https://github.com/khoih-prog/ESP_DoubleResetDetector
Can detect if the reset button is pressed twice, is used to enter WIFI config mode.
* https://github.com/tzapu/WiFiManager * https://github.com/tzapu/WiFiManager
Configure wifi settings.
* https://github.com/thijse/Arduino-Log * https://github.com/thijse/Arduino-Log
Logging library for handling different loglevels and configure what sent over the serial.
* https://github.com/bblanchon/ArduinoJson * https://github.com/bblanchon/ArduinoJson
Json parser/creator used in configuration files and API's
* https://github.com/PaulStoffregen/OneWire * https://github.com/PaulStoffregen/OneWire
Communication library used for interacting with temperature sensor.
* https://github.com/milesburton/Arduino-Temperature-Control-Library * https://github.com/milesburton/Arduino-Temperature-Control-Library
Interaction with the DS18B20 sensor
* https://github.com/Rotario/arduinoCurveFitting * https://github.com/Rotario/arduinoCurveFitting
Create the gravity formula.
* https://graphjs.com/ * https://graphjs.com/
Render the graphs in the UI.
* https://getbootstrap.com/ * https://getbootstrap.com/
CSS templates for the web page.
.. toctree:: .. toctree::
:maxdepth: 2 :maxdepth: 2
:caption: Contents: :caption: Contents:
releases
functionallity functionallity
installation installation
configuration configuration

View File

@ -13,20 +13,33 @@ The basic command for flashing is;
In the /bin directory you will find 3 different firmware builds; In the /bin directory you will find 3 different firmware builds;
* firmware.bin - This is the standard release build (prefered version) * **firmware.bin**
* firmware-perf.bin - This version also submits performance data to an influx database with detailed execution times.
* firmware-debug.bin - Development build. Not recommended for normal use. This is the standard release build (prefered version)
* **firmware-perf.bin**
This version also submits performance data to an influx database with detailed execution times.
* **firmware-debug.bin**
Development build. Not recommended for normal use.
In these versions all the html files are embedded in the binaries. The file system is currently only used for storing In these versions all the html files are embedded in the binaries. The file system is currently only used for storing
the configuration file. the configuration file.
If the software becomes so large the html files can be moved to the file system, but this is not enabled by default. This makes If the software becomes so large the html files can be moved to the file system, but this is not enabled by
installation much easier and ensure that html files and code is in sync. default (see compiling for details). This approach makes installation much easier and ensure that html files
and code is in sync.
Configuring WIFI Configuring WIFI
================ ================
When the device is flashed it will need to have WIFI configuration in order to work. If this is not configured in the device it will create an wirless access point called `GravMon`. When the device is flashed it will need to have WIFI configuration in order to work. If you have used other software on
the device its possible that wifi settings exist.
If this is not configured in the device it will create an wirless access point called `GravMon`. Connect to this AP and
enter the SSID and password you want to use. If the web page dont open automatically you can enter the following adress
in the browser: **http://192.168.4.1**
Connect to this AP and enter the SSID and password you want to use. If the web page dont open automatically you can enter the following adress in the browser: **http://192.168.4.1**

View File

@ -0,0 +1,9 @@
Releases
------------
There is not yet any releases publised.
Latest stable development version is: **v0.4.0**
https://github.com/mp-se/gravitymon/releases/tag/v0.4.0