Hello,
I want to set Chronoamperometry measurement parameters based on user settings such as DC voltage, interval time, and duration of the measurements will set by a user. So how can I automatically update it in the code?
My attempt is like that,
char const * Chrono_Amp = "e\n" "var p\n" "var c\n" "set_pgstat_mode 2\n" "cell_on\n" // A DC potential of 100 mV (EdcChro) is applied. The current is measured every 100 ms (tintervalChro) for // a total of 2 seconds (trunChro). This results in a total of 20 data points at a rate of 10 points per second. //"meas_loop_ca p c 100m 100m 2\n" // Concatenate the other commands printf("meas_loop_ca p c %u %u %u\n", EdcChro, tintervalChro, trunChro); "pck_start\n" "pck_add p\n" "pck_add c\n" "pck_end\n" "endloop\n" "on_finished:\n" "cell_off\n" "\n";
I got these errors,
../Core/Src/main.c:225:47: error: expected ',' or ';' before 'printf'
225 | printf("meas_loop_ca p c %u %u %u\n", EdcChro, tintervalChro, trunChro);
| ^~~~~~
../Core/Src/main.c:226:43: error: expected identifier or '(' before string constant
226 | "pck_start\n"
| ^~~~~~~~~~~~~
make: *** [Core/Src/subdir.mk:46: Core/Src/main.o] Error 1
"make -j16 all" terminated with exit code 2. Build might be incomplete.