Good morning to all, I’m new on this community as i’m beginning to develop with ESP32 and Arduino framework under platformio.
The issue i’m facing is that my software works properly only if i call at least once Serial.print(“something”) in the only function called in the loop as showed in the pseudo-code below.
In case the Serial.print is not called inside MyFunction() it will not run: i checked turning on and off a led.
I do not need the Serial.print, do you have any explaination for this behavior ?
void setup() {
Serial.begin(115200);
}
void loop() {
MyFunction();
}
void MyFunction(void)
{
static uint8_t counter = 0;
while(true)
{
if(counter = 0)
{
Serial.pirnt("something");
counter++;
}
domytasks();
}
}
Thanks for the support in advance.