Commit 1be6857b authored by Olivier Kaufmann's avatar Olivier Kaufmann
Browse files

Updates a dev/test for 3 muxes 2024

Showing with 5 additions and 4 deletions
+5 -4
...@@ -7,9 +7,9 @@ from ohmpi.hardware_components.mux_2024_rev_0_0 import Mux, MUX_CONFIG ...@@ -7,9 +7,9 @@ from ohmpi.hardware_components.mux_2024_rev_0_0 import Mux, MUX_CONFIG
from ohmpi.hardware_components import raspberry_pi_i2c as ctl_module from ohmpi.hardware_components import raspberry_pi_i2c as ctl_module
from ohmpi.config import HARDWARE_CONFIG from ohmpi.config import HARDWARE_CONFIG
stand_alone_mux = True stand_alone_mux = False
part_of_hardware_system = False part_of_hardware_system = False
within_ohmpi = False within_ohmpi = True
# Stand alone mux # Stand alone mux
if stand_alone_mux: if stand_alone_mux:
mux_id = 'mux_04' mux_id = 'mux_04'
...@@ -47,10 +47,11 @@ if within_ohmpi: ...@@ -47,10 +47,11 @@ if within_ohmpi:
from ohmpi.ohmpi import OhmPi from ohmpi.ohmpi import OhmPi
print('Starting test of mux within OhmPi.') print('Starting test of mux within OhmPi.')
k = OhmPi() k = OhmPi()
A, B, M, N = (25, 28, 27, 26)
k.reset_mux() k.reset_mux()
k._hw.switch_mux([10, 13, 12, 11], state='on') k._hw.switch_mux([A, B, M, N], state='on')
k._hw.vab_square_wave(12.,12., cycles=2) k._hw.vab_square_wave(12.,12., cycles=2)
k._hw.switch_mux([10, 13, 12, 11], state='off') k._hw.switch_mux([A, B, M, N], state='off')
k._hw.calibrate_rx_bias() # electrodes 1 4 2 3 should be connected to a reference circuit k._hw.calibrate_rx_bias() # electrodes 1 4 2 3 should be connected to a reference circuit
# print(f'Resistance: {k._hw.last_rho :.2f} ohm, dev. {k._hw.last_dev:.2f} %, rx bias: {k._hw.rx._bias:.2f} mV') # print(f'Resistance: {k._hw.last_rho :.2f} ohm, dev. {k._hw.last_dev:.2f} %, rx bias: {k._hw.rx._bias:.2f} mV')
# k._hw._plot_readings() # k._hw._plot_readings()
......
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