ESP-IDF and printf() function
Posted: Thu Jan 20, 2022 5:24 pm
Hi, a strange thing happens to me.
I created a sketch where I use bluetooth to communicate with external apps and it happens in some cases that the execution of the sketch stops if I insert the printf () function;
Faccio un esempio:
in this case the function works fine.
If instead I insert the second printf () function:
In this case the execution of the sketch stops at the first printf() function of "value0" and does not proceed with the assignment of "value1" as it does not print the second printf ()
I hope I was clear.
Thank you
I created a sketch where I use bluetooth to communicate with external apps and it happens in some cases that the execution of the sketch stops if I insert the printf () function;
Faccio un esempio:
Code: Select all
if(param->write.value[2] == 8){
valore0 = param->write.value[0];
valore1 = param->write.value[1];
printf("value1= %d\n",param->write.value[1]);
}
If instead I insert the second printf () function:
Code: Select all
if(param->write.value[2] == 8){
value0 = param->write.value[0];
printf("value0= %d\n",param->write.value[0]);
value1 = param->write.value[1];
printf("value1= %d\n",param->write.value[1]);
}
I hope I was clear.
Thank you