H2O2ValLast , \ _H2O2Conc ,\ _current , \ _Pump]) lastWriteTime = time.time() except: traceback.print_exc() pass finally: GPIO.cleanup() ports = list(serial.tools.list_ports.comports()) for p in ports: try: dev = Potentiostat(p[0]) dev.stop_test() except: pass
from __future__ import print_function from potentiostat import Potentiostat import sys if len(sys.argv) > 1: port = sys.argv[1] else: #port = '/dev/ttyACM0' port = '/dev/tty.usbmodem65156601' dev = Potentiostat(port) param_rsp = dev.stop_test() print(param_rsp)