Commit 4ce94d38 authored by Clement Remi's avatar Clement Remi
Browse files

Update OhmPi.py correction of the relay switch number

Showing with 1 addition and 1 deletion
+1 -1
......@@ -1206,7 +1206,7 @@ class OhmPi(object):
# find I2C address of the electrode and corresponding relay
# considering that one MCP23017 can cover 16 electrodes
i2c_address = 7 - (electrode_nr - 1) // 16 # quotient without rest of the division
relay_nr = electrode_nr - (electrode_nr // 16) * 16 + 1
relay_nr = (electrode_nr-1) - ((electrode_nr-1) // 16) * 16
if i2c_address is not None:
# select the MCP23017 of the selected MUX board
......
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