Commit f49a0dee authored by Olivier Kaufmann's avatar Olivier Kaufmann
Browse files

Merge remote-tracking branch 'origin/master' into mqtt

# Conflicts:
#	deploy_virtual_env.sh
#	ohmpi.py
#	requirements.txt
Showing with 22 additions and 5 deletions
+22 -5
......@@ -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/
......
File deleted
#!/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
......@@ -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, ' \
......
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