diff --git a/README.md b/README.md index 1fd24228ed9bca9a6a69024627ed3c4414fb2bc6..f4be390a74f9a9418e00506c6c6f84c28b8d9ec9 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # OhmPi -Development of a low-cost multi-electrodes resistivimeter for electrical resistivity mesaurement for lab applications, based on raspberry board +Development of a low-cost multi-electrodes resistivity meter for electrical resistivity mesaurement for lab applications, based on raspberry board ## Installation diff --git a/deploy_virtual_env.sh b/deploy_virtual_env.sh new file mode 100644 index 0000000000000000000000000000000000000000..6590536381e3428c97f684fe1cbeade84987a916 --- /dev/null +++ b/deploy_virtual_env.sh @@ -0,0 +1,7 @@ +#!/bin/bash +sudo apt-get install -y libatlas-base-dev +python -m venv ohmpy +source ohmpy/bin/activate || exit 1 # NOTE: Added || exit to avoid installing requirements in system python +export CFLAGS=-fcommon +pip install -r requirements.txt + diff --git a/logging_setup.py b/logging_setup.py index 2dc30f81b0bd93bf656db26e102e1dfcc5bb3d03..5f6d3b6d9d7fbeb978f2990d3d5e212290fb5ac0 100644 --- a/logging_setup.py +++ b/logging_setup.py @@ -43,6 +43,7 @@ def setup_loggers(mqtt=True): exec_logger.setLevel(EXEC_LOGGING_CONFIG['logging_level']) if logging_to_console: + print(f'logging exec ? {logging_to_console}') # TODO: delete this line console_exec_handler = logging.StreamHandler(sys.stdout) console_exec_handler.setLevel(EXEC_LOGGING_CONFIG['logging_level']) console_exec_handler.setFormatter(exec_formatter) diff --git a/ohmpi.py b/ohmpi.py index 238d7ef12b48678926cb18498712228566a54dfb..357dd5e27bbb653e8b8131570b85d6464252fcb3 100644 --- a/ohmpi.py +++ b/ohmpi.py @@ -578,7 +578,7 @@ class OhmPi(object): self.ads_voltage = ads.ADS1115(self.i2c, gain=2 / 3, data_rate=860, address=0x49) pin1.value = True # inject from pin1 to pin0 pin0.value = False - time.sleep(0.2) + # time.sleep(0.2) # measure current and voltage current = AnalogIn(self.ads_current, ads.P0).voltage / (50 * self.r_shunt) @@ -670,6 +670,10 @@ class OhmPi(object): if cmd == 'update_settings' and args is not None: self._update_acquisition_settings(args) status = True + elif cmd == 'set_sequence' and args is not None: + self.sequence = np.array_str + self._update_acquisition_settings(args) + status = True elif cmd == 'start': self.measure(cmd_id) while not self.status == 'idle': diff --git a/requirements_not_on_pi.txt b/requirements_not_on_pi.txt new file mode 100644 index 0000000000000000000000000000000000000000..d26aec9769d214526d1194413304c3ae460be25e --- /dev/null +++ b/requirements_not_on_pi.txt @@ -0,0 +1,5 @@ +numpy +paho-mqtt +termcolor +pandas +pyzmq