My code
void setup() {
Serial.begin(115200);
while (!Serial) {}
Serial.println("Setup");
}
int t = 0;
void loop() {
Serial.println("Loop1");
if (t==0){
t = 1;
Serial.println("Loop2");
}
}
All that is printed is Loop1 (indefinetly).
Edit: added !serial as suggested by @aMike
Any idea?
question from:https://stackoverflow.com/questions/65831437/serial-println-works-only-inside-of-loop