diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f2e6e93d68a55eaefb2e97cae411327e4b70ef3e..6a33db667831a41fbe32e110317ce4e7ae1f96ff 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -10,6 +10,7 @@ pages: - pip install sphinx numpydoc sphinx_rtd_theme pandoc recommonmark - cd doc - make html + # also make latex? pdf? - cd .. - mv doc/build/html/ public/ diff --git a/PCB_file_measurement card/measurement_board/card_measure_raspberry_v4.00.fzz b/PCB_file_measurement card/measurement_board/card_measure_raspberry_v4.00.fzz deleted file mode 100644 index 2e5921d27311266d393b40c8db449bafa7329b45..0000000000000000000000000000000000000000 Binary files a/PCB_file_measurement card/measurement_board/card_measure_raspberry_v4.00.fzz and /dev/null differ diff --git a/create_virtual_environment.sh b/create_virtual_environment.sh new file mode 100755 index 0000000000000000000000000000000000000000..f5bc4cbdca75346e225a992f1b21aae2e8a4b5b5 --- /dev/null +++ b/create_virtual_environment.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +# ensure that the libatlas-base-dev library is installed +sudo apt-get install -y libatlas-base-dev + +# Create the virtual environment +python3 -m venv ohmpy + +# Activate it +source ohmpy/bin/activate || exit 1 # NOTE: Added || exit to avoid installing requirements in system python if the virtual environment can't be loaded + +# Solve issues associated to storage allocation +export CFLAGS=-fcommon + +# install all required packages in the virtual environment. +pip install -r requirements.txt + diff --git a/ohmpi.py b/ohmpi.py index dd3016eba5f5acfba1b64b8f44c98911ec6ecc6f..9e4c8f09b144e92f4aa40d5e340b633a8da60f57 100644 --- a/ohmpi.py +++ b/ohmpi.py @@ -4,13 +4,12 @@ created on January 6, 2020. Updates May 2022, Oct 2022. Ohmpi.py is a program to control a low-cost and open hardware resistivity meter OhmPi that has been developed by Rémi CLEMENT (INRAE),Vivien DUBOIS (INRAE), Hélène GUYARD (IGE), Nicolas FORQUET (INRAE), Yannick FARGIER (IFSTTAR) -Olivier KAUFMANN (UMONS) and Guillaume BLANCHY (ILVO). +Olivier KAUFMANN (UMONS), Arnaud WATELET (UMONS) and Guillaume BLANCHY (ILVO). """ import os import io import json - import numpy as np import csv import time @@ -582,7 +581,7 @@ class OhmPi(object): # measure current and voltage current = AnalogIn(self.ads_current, ads.P0).voltage / (50 * self.r_shunt) - voltage = -AnalogIn(self.ads_voltage, ads.P0, ads.P1).voltage * 2.5 + voltage = 12. # compute resistance measured (= contact resistance) resistance = np.abs(voltage / current) msg = f'Contact resistance {str(quad):s}: I: {current * 1000.:>10.3f} mA, ' \ diff --git a/requirements.txt b/requirements.txt index 63b85440e386b51755d729bdd8bbffa9e73ba67a..a4fa7862ff9840ec09d584c56f131f0410ef2b73 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,10 +2,10 @@ RPi.GPIO adafruit-blinka numpy paho-mqtt -adafruit-circuitpython-ads1x15 +adafruit-circuitpython-adsgit 1x15 adafruit-circuitpython-tca9548a adafruit-circuitpython-mcp230xx gpiozero termcolor pandas -pyzmq +pyzmq \ No newline at end of file