Commit f2d8eb87 authored by Clement Remi's avatar Clement Remi
Browse files

update documentation, new organisation

Showing with 4439 additions and 1011 deletions
+4439 -1011
File added
File added
File added
No preview for this file type
File added
File added
No preview for this file type
No preview for this file type
File added
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>STEP n°1 : Raspberry Pi configuration &mdash; Ohmpi: open hardware resistivity-meter documentation</title><link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<!--[if lt IE 9]>
<script src="../_static/js/html5shiv.min.js"></script>
<![endif]-->
<script id="documentation_options" data-url_root="../" 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/language_data.js"></script>
<script async="async" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/latest.js?config=TeX-AMS-MML_HTMLorMML"></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="STEP n°2: Measurement board" href="V2_00_step_02.html" />
<link rel="prev" title="OhmPi V 2.xx (64 or 128 electrodes)" href="../V2_00.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"> Ohmpi:
</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">
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../Ohmpi.html">OhmPi project</a></li>
<li class="toctree-l1"><a class="reference internal" href="../V1_01.html">OhmPi V 1.01 (limited to 32 electrodes)</a></li>
<li class="toctree-l1"><a class="reference internal" href="../V1_02.html">OhmPi V 1.02 (limited to 32 electrodes)</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="../V2_00.html">OhmPi V 2.xx (64 or 128 electrodes)</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="../V2_00.html#the-philosophy-of-ohmpi">The philosophy of Ohmpi</a></li>
<li class="toctree-l2"><a class="reference internal" href="../V2_00.html#technical-data">Technical data</a></li>
<li class="toctree-l2 current"><a class="reference internal" href="../V2_00.html#ohmpi-2-step-by-step">Ohmpi 2 step by step</a><ul class="current">
<li class="toctree-l3 current"><a class="current reference internal" href="#"><strong>STEP n°1</strong> : Raspberry Pi configuration</a><ul>
<li class="toctree-l4"><a class="reference internal" href="#os-installation">OS installation</a></li>
<li class="toctree-l4"><a class="reference internal" href="#virtual-environnement-and-packages">Virtual Environnement and packages</a></li>
<li class="toctree-l4"><a class="reference internal" href="#activate-virtual-environnement-on-thonny-python-ide-on-rapberry-pi">Activate virtual environnement on Thonny (Python IDE) (on Rapberry Pi)</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="V2_00_step_02.html"><strong>STEP n°2</strong>: Measurement board</a></li>
</ul>
</li>
</ul>
</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">Ohmpi:</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><a href="../V2_00.html">OhmPi V 2.xx (64 or 128 electrodes)</a> &raquo;</li>
<li><strong>STEP n°1</strong> : Raspberry Pi configuration</li>
<li class="wy-breadcrumbs-aside">
<a href="../_sources/Ohmpi_V2_00/V2_00_step_01.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">
<div class="section" id="step-n1-raspberry-pi-configuration">
<h1><strong>STEP n°1</strong> : Raspberry Pi configuration<a class="headerlink" href="#step-n1-raspberry-pi-configuration" title="Permalink to this headline"></a></h1>
<div class="section" id="os-installation">
<h2>OS installation<a class="headerlink" href="#os-installation" title="Permalink to this headline"></a></h2>
<table class="docutils align-default">
<colgroup>
<col style="width: 78%" />
<col style="width: 22%" />
</colgroup>
<tbody>
<tr class="row-odd"><td><p><strong>Required components</strong></p></td>
<td><p><strong>Quantity</strong></p></td>
</tr>
<tr class="row-even"><td><p>Raspberry Pi 4 Model B</p></td>
<td><p>1</p></td>
</tr>
<tr class="row-odd"><td><p>Micro SD 32 Go</p></td>
<td><p>1</p></td>
</tr>
<tr class="row-even"><td><p>HDMI Cable</p></td>
<td><p>1</p></td>
</tr>
<tr class="row-odd"><td><p>Computer mouse</p></td>
<td><p>1</p></td>
</tr>
<tr class="row-even"><td><p>Computer Keyboard</p></td>
<td><p>1</p></td>
</tr>
</tbody>
</table>
<p>The first step is to start up the Raspberry Pi board, including installation of an OS (operating system).
For this step, the installation instructions are well described on the Raspberry website</p>
<ol class="arabic simple">
<li><p>Watch the vidéo “how to set up your raspberry Pi” (<a class="reference external" href="https://www.youtube.com/watch?v=wjWZhV1v3Pk">https://www.youtube.com/watch?v=wjWZhV1v3Pk</a>)</p></li>
<li><p>The authors recommend installing the latest stable and complete version of Raspbian by using NOOBS (a simple-to-use operating system installer).</p></li>
<li><p>or you can visit this website : (<a class="reference external" href="https://projects.raspberrypi.org/en/projects/raspberry-pi-setting-up">https://projects.raspberrypi.org/en/projects/raspberry-pi-setting-up</a>)</p></li>
</ol>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>All the development tests were performed on Raspberry Pi 3 Model B, we used the following version of Raspbian:</p>
<div class="align-center figure">
<a class="reference internal image-reference" href="../_images/raspbian_version1.jpg"><img alt="alternate text" src="../_images/raspbian_version1.jpg" style="width: 800px; height: 400px;" /></a>
</div>
</div>
<div class="admonition warning">
<p class="admonition-title">Warning</p>
<p>Once the OS has been installed, <strong>1-wire, spi and GPIO remote option</strong> must be deactivated via the Raspbian GUI settings menu. Failure to carry out this task may cause damage to the relay shield cards during measurements.</p>
</div>
<p>3. When the relays are connected to the GPIO, make sure that all the GPIOs are in the low position when the raspberry starts up. If not, the relays will activate unexpectedly.
To ensure that the GPIOs are in Low position, you will need to modify the /boot/config.txt file.</p>
<blockquote>
<div><p>Run the terminal, and write</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">cd</span> <span class="o">/</span><span class="n">boot</span><span class="o">/</span>
</pre></div>
</div>
</div></blockquote>
<ol class="arabic simple" start="4">
<li><p>Open config.txt with GNU nano editor</p></li>
</ol>
<blockquote>
<div><div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">sudo</span> <span class="n">nano</span> <span class="n">config</span><span class="o">.</span><span class="n">txt</span>
</pre></div>
</div>
</div></blockquote>
<ol class="arabic simple" start="5">
<li><p>At the end of the file write :</p></li>
</ol>
<blockquote>
<div><div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">gpio</span><span class="o">=</span><span class="mi">8</span><span class="o">=</span><span class="n">op</span><span class="p">,</span><span class="n">dl</span>
<span class="n">gpio</span><span class="o">=</span><span class="mi">7</span><span class="o">=</span><span class="n">op</span><span class="p">,</span><span class="n">dl</span>
</pre></div>
</div>
</div></blockquote>
<ol class="arabic simple" start="6">
<li><p>Press Ctrl +O to save the modifications and press enter</p></li>
<li><p>Press Ctrl +x to escap and return to the terminal</p></li>
<li><p>Close the terminal</p></li>
</ol>
</div>
<div class="section" id="virtual-environnement-and-packages">
<h2>Virtual Environnement and packages<a class="headerlink" href="#virtual-environnement-and-packages" title="Permalink to this headline"></a></h2>
<p>A virtual environment is a way to have multiple, parallel instances of the Python interpreter, each with different package sets and different configurations.
Each virtual environment contains a discrete copy of the Python interpreter, including copies of its support utilities. It also protects your system in case of problems with the packages.</p>
<p>All dependencies are specified in requirements.txt</p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>All instructions below should be typed in the terminal</p>
</div>
<p>It is first necessary to ensure that the libatlas-base-dev library is installed:</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">sudo</span> <span class="n">apt</span><span class="o">-</span><span class="n">get</span> <span class="n">install</span> <span class="n">libatlas</span><span class="o">-</span><span class="n">base</span><span class="o">-</span><span class="n">dev</span>
</pre></div>
</div>
<p>We strongly recommend users to create a virtual environment to run the code and installed all required dependencies. It can be done either in a directory gathering all virtual environments used on the computer or within the ohmpy directory.</p>
<p>Create the virtual environment:</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">python3</span> <span class="o">-</span><span class="n">m</span> <span class="n">venv</span> <span class="n">ohmpy</span>
</pre></div>
</div>
<p>Activate it using the following command:</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">source</span> <span class="n">ohmpy</span><span class="o">/</span><span class="nb">bin</span><span class="o">/</span><span class="n">activate</span>
</pre></div>
</div>
<p>Install packages within the virtual environment. Installing the following package should be sufficient to meet dependencies:</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">pip</span> <span class="n">install</span> <span class="n">RPi</span><span class="o">.</span><span class="n">GPIO</span> <span class="n">adafruit</span><span class="o">-</span><span class="n">blinka</span> <span class="n">numpy</span> <span class="n">adafruit</span><span class="o">-</span><span class="n">circuitpython</span><span class="o">-</span><span class="n">ads1x15</span> <span class="n">pandas</span>
</pre></div>
</div>
<p>Check that requirements are met using</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">pip</span> <span class="nb">list</span>
</pre></div>
</div>
<p>You should run you code within the virtual environment
to leave the virtual environment simply type:</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">deactivate</span>
</pre></div>
</div>
</div>
<div class="section" id="activate-virtual-environnement-on-thonny-python-ide-on-rapberry-pi">
<h2>Activate virtual environnement on Thonny (Python IDE) (on Rapberry Pi)<a class="headerlink" href="#activate-virtual-environnement-on-thonny-python-ide-on-rapberry-pi" title="Permalink to this headline"></a></h2>
<p>If you decided to use a virtual environment, it is necessary to setup Thonny Python IDE the first time you use it.</p>
<p>1- Run the Thonny Python IDE software, Click on raspebrry acces <strong>menu &gt; programming&gt; Thonny pythonIDE</strong></p>
<p>2- Thonny’s interface opens, Python runs on the Root (Python 3.7.3 (/usr/bin/python3))</p>
<div class="align-center figure">
<a class="reference internal image-reference" href="../_images/thonny_first_interface1.jpg"><img alt="alternate text" src="../_images/thonny_first_interface1.jpg" style="width: 600px; height: 450px;" /></a>
</div>
<p>3-Click on <strong>Run&gt;select interpreter</strong>, a new window opens click on interpret</p>
<div class="align-center figure">
<a class="reference internal image-reference" href="../_images/thonny_option1.jpg"><img alt="alternate text" src="../_images/thonny_option1.jpg" style="width: 600px; height: 450px;" /></a>
</div>
<p>4-On the new open windows select <strong>alternative Pyhton3 or virtual environnement</strong></p>
<div class="align-center figure">
<a class="reference internal image-reference" href="../_images/thonny_interpreter1.jpg"><img alt="alternate text" src="../_images/thonny_interpreter1.jpg" style="width: 600px; height: 450px;" /></a>
</div>
<p>5- New buttons appeared, selected <strong>“locate another python executable “</strong></p>
<p>6- A new window opens, find the folder where there is the python 3 file in the virtual environment folder previously created <strong>/home/pi/ohmpi/bin/python3</strong>.</p>
<p>7- In the <strong>known interpreter</strong> tab the path of the virtual environnementshould appear</p>
<div class="align-center figure">
<a class="reference internal image-reference" href="../_images/thonny_interpreter_folder1.jpg"><img alt="alternate text" src="../_images/thonny_interpreter_folder1.jpg" style="width: 600px; height: 450px;" /></a>
</div>
<p>8- Close the window by clicking on <strong>ok</strong>.</p>
<p>9- Close thonny to save modifications</p>
</div>
</div>
</div>
</div>
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<a href="../V2_00.html" class="btn btn-neutral float-left" title="OhmPi V 2.xx (64 or 128 electrodes)" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
<a href="V2_00_step_02.html" class="btn btn-neutral float-right" title="STEP n°2: Measurement board" 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 2020, INRAE, Rémi CLEMENT.</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>
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
sphinx/build/html/_images/20210905_123034.jpg

167 KB | W: | H:

sphinx/build/html/_images/20210905_123034.jpg

208 KB | W: | H:

sphinx/build/html/_images/20210905_123034.jpg
sphinx/build/html/_images/20210905_123034.jpg
sphinx/build/html/_images/20210905_123034.jpg
sphinx/build/html/_images/20210905_123034.jpg
  • 2-up
  • Swipe
  • Onion skin
sphinx/build/html/_images/20210905_132856.jpg

85.7 KB | W: | H:

sphinx/build/html/_images/20210905_132856.jpg

130 KB | W: | H:

sphinx/build/html/_images/20210905_132856.jpg
sphinx/build/html/_images/20210905_132856.jpg
sphinx/build/html/_images/20210905_132856.jpg
sphinx/build/html/_images/20210905_132856.jpg
  • 2-up
  • Swipe
  • Onion skin
sphinx/build/html/_images/raspbian_version1.jpg

37.2 KB

sphinx/build/html/_images/schema_measurement_board1.jpg

1.04 MB

sphinx/build/html/_images/thonny_first_interface1.jpg

59.8 KB

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