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

Fixes small glitches

Showing with 19 additions and 2 deletions
+19 -2
# OhmPi # 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 ## Installation
......
#!/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
...@@ -43,6 +43,7 @@ def setup_loggers(mqtt=True): ...@@ -43,6 +43,7 @@ def setup_loggers(mqtt=True):
exec_logger.setLevel(EXEC_LOGGING_CONFIG['logging_level']) exec_logger.setLevel(EXEC_LOGGING_CONFIG['logging_level'])
if logging_to_console: 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 = logging.StreamHandler(sys.stdout)
console_exec_handler.setLevel(EXEC_LOGGING_CONFIG['logging_level']) console_exec_handler.setLevel(EXEC_LOGGING_CONFIG['logging_level'])
console_exec_handler.setFormatter(exec_formatter) console_exec_handler.setFormatter(exec_formatter)
......
...@@ -578,7 +578,7 @@ class OhmPi(object): ...@@ -578,7 +578,7 @@ class OhmPi(object):
self.ads_voltage = ads.ADS1115(self.i2c, gain=2 / 3, data_rate=860, address=0x49) self.ads_voltage = ads.ADS1115(self.i2c, gain=2 / 3, data_rate=860, address=0x49)
pin1.value = True # inject from pin1 to pin0 pin1.value = True # inject from pin1 to pin0
pin0.value = False pin0.value = False
time.sleep(0.2) # time.sleep(0.2)
# measure current and voltage # measure current and voltage
current = AnalogIn(self.ads_current, ads.P0).voltage / (50 * self.r_shunt) current = AnalogIn(self.ads_current, ads.P0).voltage / (50 * self.r_shunt)
...@@ -670,6 +670,10 @@ class OhmPi(object): ...@@ -670,6 +670,10 @@ class OhmPi(object):
if cmd == 'update_settings' and args is not None: if cmd == 'update_settings' and args is not None:
self._update_acquisition_settings(args) self._update_acquisition_settings(args)
status = True 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': elif cmd == 'start':
self.measure(cmd_id) self.measure(cmd_id)
while not self.status == 'idle': while not self.status == 'idle':
......
numpy
paho-mqtt
termcolor
pandas
pyzmq
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