if len(sys.argv) > 1: port = sys.argv[1] else: port = '/dev/ttyACM0' channel_list = [1, 7] num_sample = 10 sleep_dt = 0.25 dev = Potentiostat(port) dev.set_volt_range('5V') dev.set_curr_range('100uA') dev.set_mux_enabled(True) dev.set_enabled_mux_channels(channel_list) dev.set_mux_ref_elect_connected(True) dev.set_mux_ctr_elect_connected(True) print() for channel in channel_list: print('testing channel: ', channel) print('----------------------------------------------') dev.set_mux_wrk_elect_connected(channel) dev.set_volt(0.0) volt_list = [] curr_list = []
from __future__ import print_function from potentiostat import Potentiostat import sys if len(sys.argv) > 1: port = sys.argv[1] else: port = '/dev/ttyACM0' dev = Potentiostat(port) # Enable the multiplexer expansion hardware rsp = dev.set_mux_enabled(True) print('mux enabled: {0}'.format(rsp)) # Get the list of currently enabled mux channels rsp = dev.get_enabled_mux_channels() print('mux channels: {0}'.format(rsp)) # Set the list of enabled mux channels to new values rsp = dev.set_enabled_mux_channels([1, 2]) print('mux channels: {0}'.format(rsp)) # Get the list of currently enabled mux channels (just a check for fun) rsp = dev.get_enabled_mux_channels() print('mux channels: {0}'.format(rsp)) # Disable the multiplexer expansion hardware rsp = dev.set_mux_enabled(False) print('mux enabled: {0}'.format(rsp))