diff --git a/ohmpi.py b/ohmpi.py index 109d897a3462fed5b63b9e975a904901fec54981..2de289f4e10ba857152a5e14731318b32030e127 100644 --- a/ohmpi.py +++ b/ohmpi.py @@ -157,6 +157,15 @@ for i in pinList: GPIO.setup(i, GPIO.OUT) GPIO.output(i, GPIO.HIGH) +""" +Hardware parameters +""" +R_ref = 50 # reference resistance value in ohm +coef_p0 = 2.5 # slope for the current conversion for ADS.P0, measurement in V/V +coef_p1 = 2.5 # slope for the current conversion for ADS.P1, measurement in V/V +coef_p2 = 2.5 # slope for the current conversion for ADS.P2, measurement in V/V +coef_p3 = 2.5 # slope for the current conversion for ADS.P3, measurement in V/V + """ Main loop """ @@ -169,7 +178,7 @@ for g in range(0,pardict.get("nbr_meas")): # for time-lapse monitoring switch_mux(N[i,]) # run a measurement - current_measurement = run_measurement(pardict.get("stack"), pardict.get("injection_duration"), pardict.get("R_ref"), pardict.get("coef_p0"), pardict.get("coef_p1"), pardict.get("coef_p2"), pardict.get("coef_p3"), N[i,]) + current_measurement = run_measurement(pardict.get("stack"), pardict.get("injection_duration"), R_ref, coef_p0, coef_p1, coef_p2, coef_p3, N[i,]) # save data and print in a text file append_and_save(pardict.get("export_path"), current_measurement) diff --git a/ohmpi_param.json b/ohmpi_param.json index 32eb1907bb31c3fbbb71954c66b0611b2b9ac011..4c6b5efccf23c4c41b41260f5bcfcec180867f35 100644 --- a/ohmpi_param.json +++ b/ohmpi_param.json @@ -4,10 +4,5 @@ "nbr_meas": 1, "sequence_delay": 30, "stack": 1, - "R_ref": 50, - "coef_p0": 2.02, - "coef_p1": 2.02, - "coef_p2": 1, - "coef_p3": 1, - "export_path": "~/measurement.csv" + "export_path": "home/pi/Desktop/measurement.csv" } \ No newline at end of file