Commit 0b0b4844 authored by Guillaume Blanchy's avatar Guillaume Blanchy
Browse files

update doc for interface

Showing with 55 additions and 21 deletions
+55 -21
...@@ -89,36 +89,26 @@ a mobile phone connected to the wifi of the Raspberry Pi, one can see this ...@@ -89,36 +89,26 @@ a mobile phone connected to the wifi of the Raspberry Pi, one can see this
interface, upload sequence, change parameters, run sequence and download data. interface, upload sequence, change parameters, run sequence and download data.
To configure the Raspberry Pi to act as an access point and run To configure the Raspberry Pi to act as an access point and run
the webserver automatically on start, see instructions in 'runOnStart.sh'. the webserver automatically on start, see instructions on `raspap.com <https://raspap.com/>`_ and in 'runOnStart.sh'.
Once configure, the webserver should start by itself on start and once Once configure, the webserver should start by itself on start and once
connected to the Pi, the user can go to `10.3.141.1:8080 <http://10.3.141.1:8080>`_ connected to the Pi, the user can go to `10.3.141.1:8080 <http://10.3.141.1:8080>`_
to access the interface. to access the interface.
.. figure:: img/http-interface-pseudo-section.png .. figure:: img/http-interface-pseudo-section.png
:width: 400px
:align: center Web interface with its interactive pseudo-section.
:height: 350px
:alt: Web Interface
:caption: Web interface with its interactive pseudo-section.
:figclass: align-center
.. figure:: img/http-interface-evolution.png .. figure:: img/http-interface-evolution.png
:width: 400px
:align: center Evolution of quadrupole apparent resistivity with time.
:height: 350px
:alt: Evolution of apparent resistivity with time
:caption: Evolution of quadrupole apparent resistivity with time.
:figclass: align-center
.. figure:: img/http-interface-rs.png .. figure:: img/http-interface-rs.png
:width: 400px
:align: center Contact resistance check.
:height: 350px
:alt: Contact resistance check
:caption: Contact resistance check.
:figclass: align-center
**Python interface** **Python interface**
...@@ -189,7 +179,51 @@ files (.json and .py). ...@@ -189,7 +179,51 @@ files (.json and .py).
***MQTT interface*** ***MQTT interface***
Interface to communicate with the Pi designed for the Internet of Things (IoT). Interface to communicate with the Pi designed for the Internet of Things (IoT). This interface enable to control a network of OhmPi remotely through an MQTT broker. An example of MQTT broker that can be used is `Mosquitto <https://mosquitto.org/>`_. Commands are received by ohmpi.py script and processed. All commands are sent in JSON format following the Python API with args and kwargs:
.. code-block:: json
:caption: Updating acquisition settings.
{
"cmd_id": "3fzxv121UITwGjWYgcz4xw",
"cmd": "update_settings",
"kwargs": {
"config": {
"nb_meas": 2,
"nb_electrodes": 10,
"nb_stack": 2,
"injection_duration": 2,
"sequence_delay": 100
}
}
}
.. code-block:: json
:caption: Check contact resistances
{
"cmd_id": "3fzxv121UITwGjWYgcz4xw",
"cmd": "rs_check",
}
.. code-block:: json
:caption: Running same sequence multiple times (nb_meas).
{
"cmd_id": "3fzxv121UITwGjWYgcz4Yw",
"cmd": "run_multiple_sequences",
}
.. code-block:: json
:caption: Interrupt current acquisition.
{
"cmd_id": "3fzxv121UITwGjWYgcz4xw",
"cmd": "update_settings",
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment