Commit 60b6a6cc authored by Arnaud WATLET's avatar Arnaud WATLET
Browse files

Fixes error for i2c_ext

Showing with 5 additions and 5 deletions
+5 -5
...@@ -52,9 +52,9 @@ if stand_alone: ...@@ -52,9 +52,9 @@ if stand_alone:
mux.switch(elec_dict={'A': [1], 'B': [4], 'M': [2], 'N': [3]}, state='off') mux.switch(elec_dict={'A': [1], 'B': [4], 'M': [2], 'N': [3]}, state='off')
print(f'Resistance: {voltage / current :.2f} ohm, voltage: {voltage:.2f} mV, current: {current:.2f} mA') print(f'Resistance: {voltage / current :.2f} ohm, voltage: {voltage:.2f} mV, current: {current:.2f} mA')
mux.reset() mux.reset()
mux.test({'A': [i for i in range(1, 9)], 'B': [i for i in range(1, 9)], # mux.test({'A': [i for i in range(1, 9)], 'B': [i for i in range(1, 9)],
'M': [i for i in range(1, 9)], 'N': [i for i in range(1, 9)]}, activation_time=.1) # 'M': [i for i in range(1, 9)], 'N': [i for i in range(1, 9)]}, activation_time=.1)
mux.reset() # mux.reset()
# mux as part of a OhmPiHardware system # mux as part of a OhmPiHardware system
if part_of_hardware_system: if part_of_hardware_system:
...@@ -80,7 +80,7 @@ if within_ohmpi: ...@@ -80,7 +80,7 @@ if within_ohmpi:
k = OhmPi() k = OhmPi()
# A, B, M, N = (32, 29, 31, 30) # A, B, M, N = (32, 29, 31, 30)
k.reset_mux() k.reset_mux()
k.test_mux_one_relay(mux_id='mux_03') # k.test_mux(mux_id='mux_03')
# k._hw.switch_mux([A, B, M, N], state='on') # k._hw.switch_mux([A, B, M, N], state='on')
# k._hw.vab_square_wave(12.,1., cycles=2) # k._hw.vab_square_wave(12.,1., cycles=2)
# k._hw.switch_mux([A, B, M, N], state='off') # k._hw.switch_mux([A, B, M, N], state='off')
......
...@@ -34,7 +34,7 @@ class Ctl(CtlAbstract): ...@@ -34,7 +34,7 @@ class Ctl(CtlAbstract):
super().__init__(**kwargs) super().__init__(**kwargs)
self.interfaces = dict() self.interfaces = dict()
warnings.filterwarnings("error") # to filter out adafruit warning about setting I2C frequency # warnings.filterwarnings("error") # to filter out adafruit warning about setting I2C frequency
# I2C # I2C
try: try:
self.interfaces['i2c'] = busio.I2C(board.SCL, board.SDA) # noqa self.interfaces['i2c'] = busio.I2C(board.SCL, board.SDA) # noqa
......
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