Commit edb38db8 authored by Forquet Nicolas's avatar Forquet Nicolas
Browse files

the hardware parameters have been remove from the json file and put back in...

the hardware parameters have been remove from the json file and put back in the may code. the export path is now an absolute path.
Showing with 11 additions and 7 deletions
+11 -7
......@@ -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)
......
......@@ -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
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